Keyboard Shortcuts Manager API

The Keyboard Shortcuts Manager API supports retrieving all keyboard shortcuts available in a workspace, or a specific subset of them, such as those assigned to the system, choices, or fields. It also provides information about the actions that these shortcuts trigger.

As a sample use case, you might want to implement custom keyboard shortcuts in layout, such as the document viewer. You could use this service to retrieve the information required to attach the appropriate shortcut to a specific field or choice, or for global use at the system level. Users could then navigate with the custom keyboard shortcuts through fields and choices, or trigger global actions with them.

You can also use the Keyboard Shortcuts Manager service through the REST API. For more information, see Keyboard Shortcuts Manager service.

This page contains the following information:

Fundamentals for working with keyboard shortcuts

In the Services API, the Relativity.Services.KeyboardShortcuts namespace contains the IKeyboardShortcutsManager interface with an overloaded method for retrieving a list of keyboard shortcuts from a specified workspace:

In addition, the Relativity.Services.KeyboardShortcuts namespace contains the following classes that support this service:

For more information about these classes, see Services API in the Relativity API reference page.

Retrieve keyboard shortcuts

To retrieve a list of all keyboard shortcuts in a workspace, call the GetKeyboardShortcuts() method and pass the Artifact ID of a workspace to it. This overloaded method supports filtering on choice, field, or system shortcuts by passing a KeyboardShortcutsRequest object. You can set the properties on this object to the type of shortcuts that you want to return.

The following code sample illustrates how to pass the Artifact ID of workspace to the GetKeyboardShortcuts() method.

public async Task GetKeyboardShortcuts()
   Uri servicesUri = new Uri("http://localhost/");
   Uri keplerEndpoint = new Uri("http://localhost/");

   Services.ServiceProxy.ServiceFactory serviceFactory = new Services.ServiceProxy.ServiceFactory(
        new Services.ServiceProxy.ServiceFactorySettings(servicesUri,keplerEndpoint, 
             new  Services.ServiceProxy.UsernamePasswordCredentials("username", "password")));

   Relativity.Services.KeyboardShortcuts.IKeyboardShortcutsManager proxy = serviceFactory.CreateProxy<Relativity.Services.KeyboardShortcuts.IKeyboardShortcutsManager>();

   var workspaceArtifactId = 0; //artifact ID of active workspace

   Relativity.Services.KeyboardShortcuts.Models.KeyboardShortcutInformation result = await proxy.GetKeyboardShortcuts (workspaceArtifactId);

Community Updates

Aero Developer FAQ Evolving the Platform Most recent release notes
Learn more Learn more Learn more

Additional Resources

Access Third-Party Tools with GitHub     Create .NET Apps Faster with NuGet
Visit github     visit nuget