-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
Description
In the topic Descriptor for Applications, Components, and Libraries section sap.ui5/commands
, it says
Specifies provided commands with a unique key/alias. Contains:
shortcut
: String that describes a key combination. When the user presses the key combination, the command is triggered.
Unfortunately it is not enough to understand how it can be achieved exactly.
- Is the
shortcut
value space-sensitive or case-sensitive? (Yes and no, according to the current source code) - Are single key commands allowed? (Yes, according to the source code)
- Are commands freely definable or is there a limited set of allowed commands?
- List of already defined shortcuts categorized by UI5 controls: https://help.sap.com/docs/SAPUI5/bc5a64aac808463baa95b4230f221716/144d377d68784689a9b21565dfa14065.html
- List of already defined shortcuts by SAP Fiori elements: https://github.com/SAP-docs/sapui5/blob/main/docs/06_SAP_Fiori_Elements/keyboard-shortcuts-0cd318c.md which states the following restrictions:
-
Don't use a keyboard shortcut for a custom button that is already defined as a standard shortcut by SAP Fiori elements. This results in unexpected behavior.
-
Keyboard shortcuts aren't supported for application-defined inline actions and inline navigation buttons in tables.
-
- Current valid and list of disallowed shortcuts visible in the source code: sap/ui/core/util/ShortcutHelper.js
- Other limitations?
- Document: adding
<core:CommandExecution command="MyCommand"/>
requires"MyCommand": { "shortcut": "..." }
to exist inmanifest.json
.Otherwise, this will lead to the following error which prevents the app from being cleaned up:TypeError: Cannot read properties of null (reading 'shortcut')
... and causes the "duplicate id" error when attempting to open the app again.
Fix 1: [FIX] Descriptor_for_Applications_Components_and_Libraries_manifest_json_be0cf40.md #90
Fix 2: UI5/openui5@a500d77 "CommandExecution: Log error when command not found + make destroy fail-safe" - Document: focus-independent or focus-less command execution is not allowed either (Cf. sap.ui.core.CommandExecution: executable only on tabbable elements openui5#2788).
- ...
- Document: adding
- Brief documentation regarding the popup opened by the
sap.ui.core.ShortcutHintsMixin
and how the popup's behavior differs from the native tooltip. → There are cases where the native tooltip and the shortcut popup are both shown at the same time. According to some users, it's confusing since the popup and the native tooltip don't differ much in visual design (depending on the OS).
A link pointing to a dedicated topic would be nice so that readers can learn more if they intend to implement commands.