CKEditor Keyboard Shortcuts
Bloomreach Content Keyboard Shortcuts
The following keyboard shortcuts are available in Bloomreach Content's CKEditor integration:
| Shortcut | Action |
|---|---|
| Ctrl + M | Maximize the editor (full screen mode) |
| Alt + B | Toggle display of block element borders |
Keyboard Shortcut Configuration
CKEditor keyboard shortcuts trigger named commands associated with CKEditor toolbar items. Define keyboard shortcuts using the CKEditor configuration property keystrokes. Each shortcut can combine Control, Alt, Shift, and individual keys.
To add a keyboard shortcut, use the HTML field configuration property ckeditor.config.appended.json to append keystroke definitions to the CKEditor keystrokes property.
For example, to configure the shortcut Control + Alt + T to execute the table command:
{ keystrokes: [ [ 'Ctrl', 'Alt', 'T', 'table' ] ] }
You can use the following key names:
- 'Ctrl', 'Alt', 'Shift'
- 'F1' to 'F12' for function keys
- Single-character strings for all other keys
Key names are not case-sensitive.
Keystroke Formats: Declarative and Numeric
Bloomreach Content supports two keystroke formats: declarative and numeric.
- Declarative keystrokes use an array of strings. Each string (except the last) represents a key in the shortcut. The last string specifies the command to execute. This format is specific to Bloomreach Content.
- Numeric keystrokes use an array with two elements: a numeric value representing the key combination, and a string specifying the command. This is the standard CKEditor format.
When you configure declarative keystrokes, Bloomreach Content converts them to numeric keystrokes when initializing CKEditor.
If declarative keystrokes do not work, you can use numeric keystrokes. To calculate the numeric value, add the decimal values for each key in the combination:
- Numbers and symbols: ASCII code
- Letters: ASCII code of the uppercase letter (e.g., 65 for 'A'; using 97 for 'a' does not work)
- Function keys F1–F12: 112–123
- Control: 1114112 (0x110000)
- Shift: 2228224 (0x220000)
- Alt: 4456448 (0x440000)
For example, the numeric value for 'Control + Alt + T' is 1114112 + 4456448 + 84 = 5570644. The declarative keystroke [ 'Ctrl', 'Alt', 'T', 'help' ] is equivalent to the numeric format [ 5570644, 'help' ]. Declarative format is recommended for easier configuration.