Skip to content

Dashboard shortcuts calls the server for each keypress #2469

@JamesNK

Description

@JamesNK

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions