-
Notifications
You must be signed in to change notification settings - Fork 851
Closed
Labels
Milestone
Description
The current design ignores key presses inside some controls but otherwise sends them all to the server. That potentially means a lot of server calls that do nothing.
To reduce network traffic and server load, the client should calculate when a shortcut is triggered, e.g. c = go to console page, or ctrl+x = close details pane, then tell the server to execute that shortcut.
e.g.
var shortcut = CalculateShortcut(e);
if (shortcut) {
DotNet.invokeMethodAsync(assemblyName, 'ExecuteShortcut', shortcut);
}It's better for the client to calculate the shortcut rather than filtering to known keys and continuing to send key presses because that would mean duplicating known keys on the client (i.e. allow c) and the server (i.e. c = go to console). Better to have a central source of truth in the client JS.
Reactions are currently unavailable