|
|
@ -77,8 +77,7 @@ namespace Avalonia.Web |
|
|
|
|
|
|
|
|
_topLevelImpl.SetCssCursor = (cursor) => |
|
|
_topLevelImpl.SetCssCursor = (cursor) => |
|
|
{ |
|
|
{ |
|
|
InputHelper.SetCursor(_containerElement, cursor); // macOS
|
|
|
InputHelper.SetCursor(_containerElement, cursor); |
|
|
InputHelper.SetCursor(_canvas, cursor); // windows
|
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
_topLevel.Prepare(); |
|
|
_topLevel.Prepare(); |
|
|
@ -254,7 +253,14 @@ namespace Avalonia.Web |
|
|
|
|
|
|
|
|
private bool OnKeyDown (string code, string key, int modifier) |
|
|
private bool OnKeyDown (string code, string key, int modifier) |
|
|
{ |
|
|
{ |
|
|
return _topLevelImpl.RawKeyboardEvent(RawKeyEventType.KeyDown, code, key, (RawInputModifiers)modifier); |
|
|
var handled = _topLevelImpl.RawKeyboardEvent(RawKeyEventType.KeyDown, code, key, (RawInputModifiers)modifier); |
|
|
|
|
|
|
|
|
|
|
|
if (!handled && key.Length == 1) |
|
|
|
|
|
{ |
|
|
|
|
|
handled = _topLevelImpl.RawTextEvent(key); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return handled; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private bool OnKeyUp(string code, string key, int modifier) |
|
|
private bool OnKeyUp(string code, string key, int modifier) |
|
|
|