Closed DJSures closed 4 months ago
Oh, I see - you've created your own parameters to not use the default @onkey____ parameters.
So for anyone else in the future, while you're used to using @onkeyup, etc... Instead just use the OnKeyUp and OnKeyDown parameters that the author created. A bit different than usual use of existing parameters.
<BlazorMonaco.Editor.StandaloneCodeEditor @ref="_tbCodeEditor"
OnKeyUp="onKeyUp" />
[JSInvokable]
void onKeyUp(BlazorMonaco.KeyboardEvent e) {
Console.WriteLine(e.KeyCode);
}
Great component, thanks for creating the JS invokes for us!
This issue should be a simple one - I haven't looked at your code to see where to change it. But I'm sure you can whip up a bug fix quickly. The onkeydown and onkeyup have invalid casts between the editor function (KeyboardEvent) and parameter type (KeyboardEventArgs).
Because of this we get a casting error...
I need to know when a key is pressed to for use in my application. Thanks again!