# Support for disabling keyboard shortcuts

**URL:** <https://community.vikunja.io/t/support-for-disabling-keyboard-shortcuts/1808>\
**Category:** Feature Discussion\
**Created:** [24 November 2023 04:00 UTC](https://community.vikunja.io/t/support-for-disabling-keyboard-shortcuts/1808 "2023-11-24T04:00:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![InsightfulIce](https://community.vikunja.io/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@InsightfulIce](https://community.vikunja.io/u/InsightfulIce)\
**Post date:** [24 November 2023 04:00 UTC](https://community.vikunja.io/t/support-for-disabling-keyboard-shortcuts/1808/1 "2023-11-24T04:00:15Z")

</div>

Support for keyboard shortcut disabling to prevent accidental key presses.

---

<div class="post-metadata">

**Author:** ![revolver](https://community.vikunja.io/user_avatar/community.vikunja.io/revolver/32/2756_2.png) [@revolver](https://community.vikunja.io/u/revolver)\
**Post date:** [27 April 2026 10:43 UTC](https://community.vikunja.io/t/support-for-disabling-keyboard-shortcuts/1808/2 "2026-04-27T10:43:14Z")

</div>

Yes, please! I **need** this feature, as the shortcuts (at least for me) are working suboptimal. Quite often, while for example updating a task’s description, some shortcut is wrongly triggered. This leads to an issue being updated in ways I did not want.

---

<div class="post-metadata">

**Author:** ![revolver](https://community.vikunja.io/user_avatar/community.vikunja.io/revolver/32/2756_2.png) [@revolver](https://community.vikunja.io/u/revolver)\
**Post date:** [27 April 2026 14:52 UTC](https://community.vikunja.io/t/support-for-disabling-keyboard-shortcuts/1808/3 "2026-04-27T14:52:22Z")

</div>

I installed the [Violentmonkey addon](https://violentmonkey.github.io/), and started using the script below to disable all shortcuts. Only tested it for a couple of hours, but seems to work OK.

```javascript
(function() {
    'use strict';

    function isEditable(element) {
        if (!element) return false;
        if (element.isContentEditable) return true;
        const tag = element.tagName;
        return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT';
    }

    function stopEvent(e) {
        if (!isEditable(document.activeElement)) {
            e.stopImmediatePropagation();
            e.preventDefault();
            return false;
        }
        // Allow normal typing in editable fields
    }

    window.addEventListener('keydown', stopEvent, true);
    window.addEventListener('keyup', stopEvent, true);
    window.addEventListener('keypress', stopEvent, true);
})();

```

---

<div class="post-metadata">

**Author:** ![revolver](https://community.vikunja.io/user_avatar/community.vikunja.io/revolver/32/2756_2.png) [@revolver](https://community.vikunja.io/u/revolver)\
**Post date:** [30 April 2026 14:25 UTC](https://community.vikunja.io/t/support-for-disabling-keyboard-shortcuts/1808/4 "2026-04-30T14:25:52Z")

</div>

For the record, this seems to work pretty well (enabling arrow keys and enter):

```auto
(function() {
    'use strict';

    function isEditable(element) {
        if (!element) return false;
        if (element.isContentEditable) return true;
        const tag = element.tagName;
        return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT';
    }

    function stopEvent(e) {
        // Always allow ENTER and arrow keys
        const allowedKeys = [
            "Enter", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"
        ];
        if (allowedKeys.includes(e.key) ||
            [13, 37, 38, 39, 40].includes(e.keyCode)) {
            return;
        }

        if (!isEditable(document.activeElement)) {
            e.stopImmediatePropagation();
            e.preventDefault();
            return false;
        }
        // Allow normal typing in editable fields
    }

    window.addEventListener('keydown', stopEvent, true);
    window.addEventListener('keyup', stopEvent, true);
    window.addEventListener('keypress', stopEvent, true);
})();

```
