Custom Keyboard Shortcuts¶
Custom keyboard shortcuts are still work in progress. Everything should work as expected, but the workflow for using and configuring them is not fully worked out yet and might require some extra steps. Documentation is also lacking in some areas.
Configuring keyboard shortcuts¶
Any registered command can be configured to be activated with a keyboard shortcut. To add a keyboard shortcut to a command, go to the "Miscellaneous" > "Keyboard Shortcuts" section in "Lime CRM Admin" (see picture below).
The ID for the command needs to be provided along with the desired keyboard shortcut. A shortcut can be provided both for Windows and Mac OS. If the OS used by the user does not match either of them, the Windows shortcuts will be used.
When registering a key sequence just type the desired key together with any
modifiers separated with
The available modifiers that can be used when configuring a keyboard shortcut are the following
The Meta key is the Win key on Windows and the
Cmd key on Mac. Since Meta is less known of a key name, it
is also possible to just specify Cmd instead, e.g. when creating a
configuration for Mac. It's not possible to configure a shortcut
containing only modifiers, e.g. only
Ctrl+Alt is not valid.
Sequences with multiple keys¶
It is possible to configure a keyboard shortcut to contain multiple keys in the
same sequence. If multiple keys are used they should be separated with a space
in the configuration. E.g. the sequence
Ctrl+U G will activate a command when
the user first press
Ctrl+U and then
G within a short timespan. This can be
used to group several related commands together. Modifiers are not limited to
the first key and can be used anywhere, e.g.
Ctrl+U Ctrl+G is valid.
Special key names¶
(space) is used as separators in the configuration, these
need special handling if they are desired to be used as a keyboard shortcut.
They names that should be used instead are listed in the table below
|Key name when used in the config
Just because a keyboard shortcut has been configured for a custom command it does not mean that it will work automatically out of the box. If the command is part of a default action menu in the webclient (e.g. on the object card or in the table) it will automatically be bound to the configured keyboard shortcut. However, if a customization has registered a command e.g. to be handled by the click of a custom button, that command will not be registered to be handled with a keyboard shortcut as well.
In order to get this to work there are two options
The customization needs to read the keyboard shortcuts configuration (
webclient_keyboard_shortcuts) and use the
KeybindingRegistryservice to bind/unbind the configured keyboard shortcut manually.
The customization needs to use either the
limec-action-menucomponents together with the command. Both components will read the config and bind/unbind the keyboard shortcuts when a component with the same context is focused or blurred.
Even though it is possible to add almost any hotkey combinations, we still want to follow a convention for creating hotkeys for the Web Client, and expect you to do so as well, to create a consistent user experience. So here are a few rules:
Hotkey chain types: We have two types of hotkey chains:
Generic: hotkeys that are about high-level and generic navigation patterns, and not specific to any context. These are usually actions that user initiates from the main navigation bar (the Dock). Such hotkey chains follow this pattern:
ctrl/cmd+ a letter. We strongly recommend you not to use this pattern, because you are most probably not creating a high-level or core hotkey, and rather are dealing with contextual hotkeys explained below.
Contextual: hotkeys that are about contextual actions, and happen deep down in views or objects, for example, when a user is viewing an object, or interacting with content of a tab. Such hotkey chains follow this pattern:
shift+ a letter. Therefore, for custom hotkeys, we strongly suggest adding a hotkey chain that that follows this pattern.
Windows vs. Mac: Make sure to be consistent for your choices on Windows and equivalent chain on mac. If you use
Xfor Windows, you must use
Xon Mac. In other words, the
ctrlkey is the equivalent of the
cmdkey on Mac OS, and not the
Do not use
altfor any hotkey chains on Mac OS. It will not work!
Avoid these hotkeys¶
Using some keyboard shortcuts will interfere with default hotkeys in the browser's or the operating system. In other words, they are either reserved by the system or well-known by users and expected to preform certain actions. So avoid using them. Some examples are:
W: since it closes the current tab on Mac and Win
B/I/S/U: since they are used for rich-text editing
1/2/.../9: they are used to switch the active tab on Chrome, Safari, Firefox
F: it's useful for finding things (buttons, table cells, etc..) on a page
X/C/V: for obvious reasons
A: since it selects all on a page, or in an active input box
L: sets the focus on browser's URL bar
T: opens a new tab on Chrome, Safari, Firefox
P: opens the print wizard (maybe we can actually ignore this?)
Z: undos an action
Y: redos an action
+/ - / 9: zooms in or out on the page
R: refreshes the page
H: hides the active app on Mac OS
M: minimizes the current window to the Dock on Mac OS
Q: quits the browser on Mac
- There are more like these. Make sure to read more on the topic for example here