What this solution does
The Kommutator.disablekeys module allows administrators to block specific keys and key combinations on 1C-Bitrix website pages. Configuration is performed via the administrative section and can be set individually for each site in a multisite installation.
Administrators select a site, activate the module, fill in the list of prohibited keys and combinations, and, if necessary, configure pages where the module should be enabled or disabled. For convenience, presets for popular browser shortcuts, DevTools, and macOS are available.
The default block list is empty, so the module does not start blocking keys without explicit configuration by an administrator. This allows effective restriction of unwanted hotkeys, such as F12, Ctrl+S, Ctrl+P, Ctrl+Shift+I, Meta+Shift+P, and others.
Key features:
- Separate settings for each site.
- Support for single keys and combinations with Ctrl, Alt, Shift, Meta.
- Presets for browser shortcuts, DevTools, and macOS.
- URL configuration for enabling the module.
- URL configuration for disabling the module.
- Exclusions by user groups.
- Exclusions by CSS selectors.
- Option to bypass input fields and editors.
The module blocks browser actions, such as opening developer tools or using hotkeys. An audit mode is available to track rule triggers without actually blocking actions. Debug notifications and console messages are provided for rule configuration and troubleshooting. The functionality supports standard access rights of the 1C-Bitrix module.
Use cases include preventing DevTools access on the public site section, restricting specific browser shortcuts on personal account pages, applying rules only to selected URLs, and disabling the module for specific user groups such as administrators or editors. It is recommended to verify triggers via audit mode before enabling full blocking.
Combination format
Each key or combination must be specified on a separate line. A combination must contain only one primary key.
Examples:
F12
Ctrl+S
Ctrl+P
Ctrl+Shift+I
Meta+Shift+P
Ctrl+Plus
NumpadAdd
Use the word Plus for the plus key and NumpadAdd for the plus key on the numeric keypad. For example, write Ctrl++ as Ctrl+Plus. The term Meta refers to the system key: Win on Windows and Command on macOS.
JavaScript can intercept only keys and key combinations that the browser passes to the page. Global operating system shortcuts and certain browser-specific combinations may be unavailable for blocking.
Module settings are accessible via the «Services → Key Blocking» section or through the path «Settings → Product Settings → Module Settings → Key and Combination Blocking».
General iT can install and configure this module and check how it works on your website.