US-12619350-B2 - Shortcut framework for supporting flexible user interface features
Abstract
An example embodiment may include: obtaining, by a shortcut framework associated with a graphical user interface, a shortcut event; identifying a component of the graphical user interface based on the component being associated with the shortcut event; identifying a shortcut action associated with the shortcut event, wherein the shortcut action specifies a shortcut action identifier associated with a shortcut function that modifies the graphical user interface; and dispatching the shortcut action identifier to the component to cause the component to perform the shortcut function that modifies the graphical user interface.
Inventors
- Hugh David Macdonald
- Stephanie Russell MacDonald
- Corbin Lane Lewis
- Wendy Beth Boucher
- Jesse Alan Hausler
Assignees
- SERVICENOW, INC.
Dates
- Publication Date
- 20260505
- Application Date
- 20230717
Claims (20)
- 1 . A method comprising: obtaining, by a shortcut framework associated with a graphical user interface, a shortcut event, wherein the graphical user interface includes a plurality of components in a hierarchical arrangement; identifying a shortcut action for the shortcut event, wherein the shortcut action specifies a shortcut action identifier for a shortcut function that modifies the graphical user interface; determining that the shortcut action is a declarative shortcut action; responsive to determining that the shortcut action is a declarative shortcut action, dispatching the shortcut action identifier to perform the shortcut function; obtaining, by the shortcut framework, an instance of an additional shortcut event; determining that the additional shortcut event is not identified with a declarative shortcut action; responsive to determining that the additional shortcut event is not identified with a declarative shortcut action, identifying a target component of the graphical user interface by (i) determining that a focus on the graphical user interface is on the target component of the plurality of components, (ii) determining that the target component matches the additional shortcut event, and (iii) responsive to determining that the target component matches the additional shortcut event, identifying the target component; identifying an additional shortcut action for the additional shortcut event, wherein the additional shortcut action specifies an additional shortcut action identifier for an additional shortcut function that modifies the graphical user interface; and dispatching the additional shortcut action identifier to the target component to cause the target component to perform the additional shortcut function that modifies the graphical user interface.
- 2 . The method of claim 1 , wherein the shortcut event is from an input modality.
- 3 . The method of claim 2 , wherein the input modality is one of a keyboard, pointer, touch-based interface, or audio command.
- 4 . The method of claim 1 , wherein the shortcut event represents a timer-related event or relates to a result of a remote application programming interface call.
- 5 . The method of claim 1 , wherein modifying the graphical user interface comprises changing a visual appearance of the target component.
- 6 . The method of claim 1 , wherein the additional shortcut event was obtained from the target component.
- 7 . The method of claim 1 , wherein the additional shortcut action also specifies a shortcut action payload that provides input to the additional shortcut function.
- 8 . The method of claim 1 , wherein the additional shortcut action is defined in a data model to include an action name, a definition of the additional shortcut action identifier, and a reference to the target component, and wherein the additional shortcut event is defined in the data model to include an event name, a description, and a further reference to the additional shortcut action as defined in the data model.
- 9 . The method of claim 1 , wherein the additional shortcut event is associated with an indication of whether the additional shortcut event is active, and wherein the additional shortcut action is identified and the additional shortcut action identifier is dispatched to the target component only when the additional shortcut event is active.
- 10 . The method of claim 1 , wherein the additional shortcut event is associated with an order that determines a precedence of the additional shortcut event when multiple shortcut events define a common shortcut.
- 11 . The method of claim 1 , wherein a subset of the plurality of components including the target component are identified as being associated with the additional shortcut event, and wherein one or more instances of the additional shortcut event cause at least some of the subset of the plurality of components to be modified.
- 12 . The method of claim 11 , wherein the one or more instances of the additional shortcut event cause the subset of the plurality of components to be highlighted.
- 13 . The method of claim 11 , wherein repeated instances of the additional shortcut event cause the focus of the graphical user interface to cycle through the subset of the plurality of components.
- 14 . The method of claim 1 , further comprising prior to obtaining the additional shortcut event: loading the target component into the graphical user interface; receiving, by the shortcut framework, a registration request from the target component, wherein the registration request identifies the target component as being shortcut-enabled; and in response to the target component being shortcut-enabled, associating, by the shortcut framework, the additional shortcut event with the additional shortcut action and the target component.
- 15 . A non-transitory computer-readable medium, having stored thereon program instructions that, upon execution by a computing system, cause the computing system to perform operations comprising: obtaining, by a shortcut framework associated with a graphical user interface, a shortcut event, wherein the graphical user interface includes a plurality of components in a hierarchical arrangement; identifying a shortcut action for the shortcut event, wherein the shortcut action specifies a shortcut action identifier for a shortcut function that modifies the graphical user interface; determining that the shortcut action is a declarative shortcut action; responsive to determining that the shortcut action is a declarative shortcut action, dispatching the shortcut action identifier to perform the shortcut function; obtaining, by the shortcut framework, an instance of an additional shortcut event; determining that the additional shortcut event is not identified with a declarative shortcut action; responsive to determining that the additional shortcut event is not identified with a declarative shortcut action, identifying a target component of the graphical user interface by (i) determining that a focus on the graphical user interface is on the target component of the plurality of components, (ii) determining that the target component matches the additional shortcut event, and (iii) responsive to determining that the target component matches the additional shortcut event, identifying the target component; identifying an additional shortcut action for the additional shortcut event, wherein the additional shortcut action specifies an additional shortcut action identifier for an additional shortcut function that modifies the graphical user interface; and dispatching the additional shortcut action identifier to the target component to cause the target component to perform the additional shortcut function that modifies the graphical user interface.
- 16 . The non-transitory computer-readable medium of claim 15 , wherein the additional shortcut action is defined in a data model to include an action name, a definition of an additional shortcut action identifier, and a reference to the target component, and wherein the additional shortcut event is defined in the data model to include an event name, a description, and a further reference to the additional shortcut action as defined in the data model.
- 17 . The non-transitory computer-readable medium of claim 15 , wherein the additional shortcut event is associated with an order that determines a precedence of the additional shortcut event when multiple shortcut events define a common shortcut.
- 18 . The non-transitory computer-readable medium of claim 15 , wherein the additional shortcut action also specifies a shortcut action payload that provides input to the additional shortcut function.
- 19 . A system comprising: one or more processors; and memory, containing program instructions that, upon execution by the one or more processors, cause the system to perform operations comprising: obtaining, by a shortcut framework associated with a graphical user interface, a shortcut event, wherein the graphical user interface includes a plurality of components in a hierarchical arrangement; identifying a shortcut action for the shortcut event, wherein the shortcut action specifies a shortcut action identifier for a shortcut function that modifies the graphical user interface; determining that the shortcut action is a declarative shortcut action; responsive to determining that the shortcut action is a declarative shortcut action, dispatching the shortcut action identifier to perform the shortcut function; obtaining, by the shortcut framework, an instance of an additional shortcut event; determining that the additional shortcut event is not identified with a declarative shortcut action; responsive to determining that the additional shortcut event is not identified with a declarative shortcut action, identifying a target component of the graphical user interface by (i) determining that a focus on the graphical user interface is on the target component of the plurality of components, (ii) determining that the target component matches the additional shortcut event, and (iii) responsive to determining that the target component matches the additional shortcut event, identifying the target component; identifying an additional shortcut action for the additional shortcut event, wherein the additional shortcut action specifies an additional shortcut action identifier for an additional shortcut function that modifies the graphical user interface; and dispatching the additional shortcut action identifier to the target component to cause the target component to perform the additional shortcut function that modifies the graphical user interface.
- 20 . The system of claim 19 , wherein the additional shortcut action also specifies a shortcut action payload that provides input to the additional shortcut function.
Description
BACKGROUND Keyboard shortcuts can enable navigation within a graphical user interface, such as invoking display of a graphical component or moving between graphical components. These shortcut capabilities are typically hard-coded into the components themselves on a per-component or per-screen basis. This rigid approach can lead to different user interface screens or experiences that employ the same shortcuts for vastly different functions. As a consequence, user interfaces within the same application or suite of applications can behave in an inconsistent fashion, thus reducing the utility of the application(s). Moreover, the inconsistent behaviors of the user interfaces can lead to more undesired interactions between a user and the user interfaces, such as when the user unintentionally selects a component. Further, such user interfaces exhibit a lack of flexibility in how shortcuts are defined, as it may not be possible for a user to customize the shortcuts to their own needs or for a developer to easily define or modify shortcut behavior and functionality. SUMMARY Various implementations disclosed herein include a flexible and configurable shortcut framework that applies to keyboard shortcuts as well as other types of shortcuts associated with user interface or system events. The shortcut framework separates shortcut events (events that trigger shortcuts such as keystrokes) from shortcut actions (what happens when a shortcut is triggered). Further, the definitions of and relationships between shortcut events and shortcut actions are stored in a data model that is distinct from the components. Thus, shortcuts can be mapped to different events and actions without having to redesign components. This results in the ability to rapidly define and modify graphical user interfaces with consistent shortcut behavior in a low-code/no-code fashion. Accordingly, a first example embodiment may involve: obtaining, by a shortcut framework associated with a graphical user interface, a shortcut event; identifying a component of the graphical user interface based on the component being associated with the shortcut event; identifying a shortcut action associated with the shortcut event, wherein the shortcut action specifies a shortcut action identifier associated with a shortcut function that modifies the graphical user interface; and dispatching the shortcut action identifier to the component to cause the component to perform the shortcut function that modifies the graphical user interface. A second example embodiment may involve a non-transitory computer-readable medium, having stored thereon program instructions that, upon execution by a computing system, cause the computing system to perform operations in accordance with the first example embodiment. In a third example embodiment, a computing system may include at least one processor, as well as memory and program instructions. The program instructions may be stored in the memory, and upon execution by the at least one processor, cause the computing system to perform operations in accordance with the first example embodiment. In a fourth example embodiment, a system may include various means for carrying out each of the operations of the first example embodiment. These, as well as other embodiments, aspects, advantages, and alternatives, will become apparent to those of ordinary skill in the art by reading the following detailed description, with reference where appropriate to the accompanying drawings. Further, this summary and other descriptions and figures provided herein are intended to illustrate embodiments by way of example only and, as such, that numerous variations are possible. For instance, structural elements and process steps can be rearranged, combined, distributed, eliminated, or otherwise changed, while remaining within the scope of the embodiments as claimed. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 illustrates a schematic drawing of a computing device, in accordance with example embodiments. FIG. 2 illustrates a schematic drawing of a server device cluster, in accordance with example embodiments. FIG. 3 depicts a remote network management architecture, in accordance with example embodiments. FIG. 4 depicts a communication environment involving a remote network management architecture, in accordance with example embodiments. FIG. 5 depicts another communication environment involving a remote network management architecture, in accordance with example embodiments. FIGS. 6A, 6B, and 6C depict a graphical user interface, the components thereof, and a tree-like representation thereof, in accordance with example embodiments. FIG. 7A depicts a graphical user interface with various components, in accordance with example embodiments. FIG. 7B depicts the graphical user interface of FIG. 7A with certain components highlighted by way of a shortcut, in accordance with example embodiments. FIG. 7C depicts the graphical user interface of FIG. 7A with the focus capable