winemac: Send Help key presses directly to the window, bypassing -[NSApplication sendEvent:].
-[NSApplication sendEvent:] seems to consume the event and doesn't pass it along to the window. Mac keyboards haven't included a Help key for a long time, but users with PC keyboards can use the Insert key, which is in the same position. The Mac driver translates either one to VK_INSERT. Signed-off-by: Ken Thomases <ken@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8b1737c0fd
commit
4b8c0d8784
|
@ -1973,6 +1973,17 @@ - (BOOL) handleEvent:(NSEvent*)anEvent
|
|||
[self handleScrollWheel:anEvent];
|
||||
ret = mouseCaptureWindow != nil;
|
||||
}
|
||||
else if (type == NSKeyDown)
|
||||
{
|
||||
// -[NSApplication sendEvent:] seems to consume presses of the Help
|
||||
// key (Insert key on PC keyboards), so we have to bypass it and
|
||||
// send the event directly to the window.
|
||||
if (anEvent.keyCode == kVK_Help)
|
||||
{
|
||||
[anEvent.window sendEvent:anEvent];
|
||||
ret = TRUE;
|
||||
}
|
||||
}
|
||||
else if (type == NSKeyUp)
|
||||
{
|
||||
uint16_t keyCode = [anEvent keyCode];
|
||||
|
|
Loading…
Reference in New Issue