discourse/docs
Isaac Janzen 1d2b6dbb01
DEV: Add `disableDefaultKeyboardShortcuts` plugin API to disable default keyboard shortcuts (#29401)
# Context

Add `disableDefaultKeyboardShortcuts` function to the plugin API to allow for disabling [default bindings](e4941278b2/app/assets/javascripts/discourse/app/lib/keyboard-shortcuts.js (L49)). 

# Details
This function is used to disable a "default" keyboard shortcut. You can pass an array of shortcut bindings as strings to disable them.

**Please note that this function must be called from a pre-initializer.**

Example:
```js
api.disableDefaultKeyboardShortcuts(['command+f', 'shift+c']);
```

- Added system spec, displaying intended behavior
2024-10-25 14:14:04 -05:00
..
ADMIN-QUICK-START-GUIDE.md Updating documentation links in admin quick start guide (#28935) 2024-09-18 09:52:12 +10:00
AUTHORS.md HTTPSify links (#7046) 2019-02-22 16:29:27 +01:00
CHANGELOG-JAVASCRIPT-PLUGIN-API.md DEV: Add `disableDefaultKeyboardShortcuts` plugin API to disable default keyboard shortcuts (#29401) 2024-10-25 14:14:04 -05:00
DEVELOPER-ADVANCED.md Update DEVELOPER-ADVANCED.md (#15770) 2022-02-02 11:05:37 -05:00
DEVELOPMENT-OSX-NATIVE.md DEV: Swap out optipng with oxipng (#15013) 2021-11-22 10:16:35 -07:00
INSTALL-cloud.md Update INSTALL-cloud.md screenshots and copy when landed on the forum homepage (#25671) 2024-02-14 07:31:44 -07:00
INSTALL-email.md update brevo free pricing (#28975) 2024-10-01 11:36:45 +08:00
INSTALL.md DEV: Update recommended Ruby to 3.2.1 (#20444) 2023-02-24 12:51:34 -03:00
PLUGINS.md discourse/discourse change from 'master' to 'main' 2021-07-19 11:46:15 -04:00
SECURITY.md FEATURE: Increase pbkdf2 iterations to 600k (#20981) 2023-04-11 11:56:20 +01:00
TESTING.md DEV: replace mailcatcher references with mailhog (#14500) 2021-10-05 15:48:06 +05:30
TROUBLESHOOTING.md for docs, normalize on space after code fence when specifying lang 2019-01-21 01:19:28 -08:00
code-of-conduct.md Update Code of Conduct to v2.0 (#12296) 2021-03-04 23:44:58 -05:00