Override shortcuts

AnkiWeb addon 604635542

Automatically detects Python-side Anki shortcuts and lets users override or remove bindings, including the window-close key, through its configuration.
AI-generated summary; may contain mistakes.

shortcuts

Open on AnkiWeb GitHub Forum topic Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2023-06-05
Anki versions
2.1.66~
License
MIT (from the license file in the package)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

abandoned

  • Last update or commit: 2023-08-15 (1174 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.642.1.66+2023-06-05
History across monthly snapshots

Loading…

Similar addons

Gamepad/Controller Mapper

Adds native gamepad support to Anki, mapping controller buttons and analog sticks to keyboard shortcuts, card actions, and smooth scrolling, with multi-profile detection, a modifier layer, and press-to-bind setup.

review-flowshortcutsaccessibility

3 votes 44% approval πŸ‘ 3 Β· πŸ‘Ž 0 Anki 2.1.1~ Updated 2026-10-04
Contanki - Controller Support for Anki (beta)

Enables controlling nearly all Anki features with a gamepad or other controller, with customizable bindings, per-context profiles, cursor control, and a quick-select overlay.

accessibilitybeta

318 votes 67% approval πŸ‘ 231 Β· πŸ‘Ž 87 ⭐ 72 Anki 23.12.1~ Updated 2024-03-01
AnkiGestureControl

Enables hands-free Anki reviews by using a webcam to detect head and hand gestures, with customizable gesture-to-action mapping, sensitivity settings, recalibration, and optional camera preview.

review-flowshortcutsaccessibility

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 1 Anki 2.1.1~ Updated 2025-12-10

Description

OVERRIDE SHORTCUTS Anki (GitHub) addon (GitHub) to automatically detect shortcuts and allow overriding.

This addon is inspired by Liresol’s excellent addon Customize Keyboard Shortcuts which is a much more complete addon. Among other things Customize Keyboard Shortcuts allows editing of some WebView shortcuts (the editor toolbar buttons) which Override shortcuts does not do.

BACKGROUND This addon tries to automatically detect any "python side" shortcuts (i.e. not in a WebView/JavaScript-side) and allow overriding. This will include some shortcuts installed by other addons (depends on when in the app life cycle the shortcut is added). This approach will automatically detect any new/modified shortcuts without a need for addon update. Note that the detection logic is not infallible, nor does it always output user friendly values. Example: "AnkiQt": {"QShortcut (A): "A"} is in fact the shortcut to open the "Add note" window from the "Main" window, the user needs to figure out what to change. It also adds the possibility to change the shortcut to close a window (default Escape).

USE Open all windows once to allow the addon to try to detect shortcuts (QAction and QShortcut), then override/remove bindings in Main window β†’ Tools β†’ Add-ons β†’ Override shortcuts β†’ Config. The help on the right will list detected shortcuts, add those to the configuration to override. Example:

{ "window close": "Escape", "AnkiQt": { "QtClassProxy action-actionAbout": "Ctrl+Alt+A", // comma between items "QtClassProxy action-actionAdd_ons": "" // empty string will remove binding }, // comma between windows "Browser": { "QtClassProxy action_toggle_bury": "" } }

A few remarks regading the naming to facilitate identifying which entry to override:

  • window close is a special key which allows overriding the default sequence of Escape to close a dialog (Browser, Add note etc.) with some other sequence (or "").
  • The firt part is the class (for some reason Qt returns QtClassProxy for the QAction class).
  • <class> <name>: Shortcut of class with name (often fairly descriptive).
  • <class> (<key sequence>): Shortcut of class without name and key sequence registered (i.e. possible to look up in documentation what that sequence does).
  • <class> [<number>]: Shortcut of class without name nor "default", number is a sequence identifier, the only way to find out what it does is to map it to a key and try (prefer doing this on a test profile).
IMPORTANT The addon only detects actions and shortcuts and allow you to override them, it makes no assurances that this is suitable. Adding a shortcut to something like "QtClassProxy [1]": "" may result in unwanted effects when activated (there may be a reason no key sequence is connected to the action). It is recommended to try out such things in a separate test profile to avoid deck corruption.

README

Override shortcuts

Anki (GitHub) addon (GitHub) to automatically detect shortcuts and allow overriding.

This addon is inspired by Liresol's excellent addon Customize Keyboard Shortcuts which is a much more complete addon. Among other things Customize Keyboard Shortcuts allows editing of some WebView shortcuts (the editor toolbar buttons) which Override shortcuts does not do.

Background

This addon tries to automatically detect any "python side" shortcuts (i.e. not in a WebView/JavaScript-side) and allow overriding. This will include some shortcuts installed by other addons (depends on when in the app life cycle the shortcut is added). This approach will automatically detect any new/modified shortcuts without a need for addon update. Note that the detection logic is not infallible, nor does it always output user friendly values. Example: "AnkiQt": {"QShortcut (A): "A"} is in fact the shortcut to open the "Add note" window from the "Main" window, the user needs to figure out what to change. It also adds the possibility to change the shortcut to close a window (default Escape).

Use

Open all windows once to allow the addon to try to detect shortcuts (QAction and QShortcut), then override/remove bindings in Main window β†’ Tools β†’ Add-ons β†’ Override shortcuts β†’ Config. The help on the right will list detected shortcuts, add those to the configuration to override. Example:

{
  "window close": "Escape",
  "AnkiQt": {
    "QtClassProxy action-actionAbout": "Ctrl+Alt+A", // comma between items
    "QtClassProxy action-actionAdd_ons": "" // empty string will remove binding
  }, // comma between windows
  "Browser": {
    "QtClassProxy action_toggle_bury": ""
  }
}

A few remarks regading the naming to facilitate identifying which entry to override:

  • window close is a special key which allows overriding the default sequence of Escape to close a dialog (Browser, Add note etc.) with some other sequence (or "").
  • The firt part is the class (for some reason Qt returns QtClassProxy for the QAction class).
  • <class> <name>: Shortcut of class with name (often fairly descriptive).
  • <class> (<key sequence>): Shortcut of class without name and key sequence registered (i.e. possible to look up in documentation what that sequence does).
  • <class> [<number>]: Shortcut of class without name nor "default", number is a sequence identifier, the only way to find out what it does is to map it to a key and try (prefer doing this on a test profile).

Important

The addon only detects actions and shortcuts and allow you to override them, it makes no assurances that this is suitable. Adding a shortcut to something like "QtClassProxy [1]": "" may result in unwanted effects when activated (there may be a reason no key sequence is connected to the action). It is recommended to try out such things in a separate test profile to avoid deck corruption.