how to change anki keyboard shortcuts

How to Customize Anki Keyboard Shortcuts

By Rachel Miller
AD

Leveraging Anki's spaced repetition system for language learning or knowledge acquisition is a game-changer. But what if you find the default keyboard shortcuts a bit cumbersome or want to customize them for better flow? Here's a step-by-step guide on how to change Anki's keyboard shortcuts, tailored for both beginners and advanced users.

Before diving into the process, let's understand why you might want to adjust these shortcuts. Customizing shortcuts can enhance your learning experience by allowing you to review and study using your preferred key assignments.

Understanding the Configuration File

The first step is to grasp the structure of Anki's configuration file, which is where the keyboard shortcuts are stored. This text-based file uses YAML syntax, making it human-readable and easy to edit.

AD
Computer Keyboard Shortcuts Every Student Should Know 💻⌨️
Computer Keyboard Shortcuts Every Student Should Know 💻⌨️
Canva Keyboard Shortcuts You NEED to Know
Canva Keyboard Shortcuts You NEED to Know
Computer shortcuts
Computer shortcuts

You'll find this file in your Anki user directory, named `prefs.ini`. Although you can edit it directly, it's safer to work with a copy or export it first to avoid losing any data.

Exporting and Importing Settings

Anki provides built-in tools to export and import settings. This option backs up your current settings and allows for easy transfer if something goes wrong during the editing process.

Essential Keyboard Shortcuts Every Student Should Know | Save Time
Essential Keyboard Shortcuts Every Student Should Know | Save Time
the keyboard shortcuts are written in red and green on a white paper with black writing
the keyboard shortcuts are written in red and green on a white paper with black writing
10 Keyboard Shortcuts Every Student Should Know
10 Keyboard Shortcuts Every Student Should Know

To export, go to Tools > Export Settings. Choose a location, and click "Export". To import, follow the same path but select "Import Settings" instead. Ensure you select the correct file when importing.

Locating the Shortcuts Section

Once you've exported and backed up your settings, open the `prefs.ini` file in a text editor. Look for the section labeled `preview_shortcuts`. This is where Anki's default shortcuts are defined.

AD

Each shortcut is defined as `key: action` on a new line. For instance, `< tigert: next_card >` sets the key 't' to advance to the next card.

Imp Keyboard Shortcuts Every Student& Professional Should Know|Windows, Browser& MS Word cheat sheet
Imp Keyboard Shortcuts Every Student& Professional Should Know|Windows, Browser& MS Word cheat sheet
the keyboard shortcuts list is shown
the keyboard shortcuts list is shown
Ultimate Windows Keyboard Shortcuts Cheat Sheet for Windows 10 & Windows 11
Ultimate Windows Keyboard Shortcuts Cheat Sheet for Windows 10 & Windows 11
Essential Keyboard Shortcuts Every Student Should Know | Windows PC Productivity Tips
Essential Keyboard Shortcuts Every Student Should Know | Windows PC Productivity Tips
100+ Computer Keyboard Shortcuts | Easy Computer Tips
100+ Computer Keyboard Shortcuts | Easy Computer Tips
20 Keyboard Shortcuts Everyone Should Know Save Time 2026
20 Keyboard Shortcuts Everyone Should Know Save Time 2026

Editing Keyboard Shortcuts

Now that you've located the shortcuts section, let's explore how to edit them. Remember,/an "action" can be a single key like 'n' for next card or a combination like 'ctrl+n' for new card.

Use the table below for reference, listing some default shortcuts and their associated actions:

AD
Default Anki Shortcuts and Their Actions
Key Action
n Next card
p Previous card
e Edit card
s Show answer

For advanced users, you can assign scripts or macros to shortcuts. For example, you can link a Python script to 'alt+b' to skip the current card and mark it as buried.

10 Keyboard Shortcuts Every Student Should Know 💻 | Productivity Tips
10 Keyboard Shortcuts Every Student Should Know 💻 | Productivity Tips
Mac Keyboard Shortcuts Cheat Sheet | Essential MacBook Productivity Guide
Mac Keyboard Shortcuts Cheat Sheet | Essential MacBook Productivity Guide
8 Keyboard Shortcuts That Save You So Much Time
8 Keyboard Shortcuts That Save You So Much Time

Adding New Shortcuts

You can also create new shortcuts with unused keys. For instance, if you want 'f5' to mark the current card as suspended, you'd add `f5: suspend_card` to the `preview_shortcuts` section.

Before trying out your new shortcut, save the `prefs.ini` file and reopen Anki. Your custom settings should be applied automatically.

AD

Testing Your Changes

After editing, restart Anki, and try out your new keyboard shortcuts. If something doesn't work as expected, check your `prefs.ini` file for any typos or incorrect entries.

Remember, Anki shows preview shortcuts when you hover over card buttons. This feature lets you see which shortcuts are currently active.

So, go ahead, customize Anki to your heart's content, and watch your learning efficiency soar!

Now that you've mastered changing Anki's keyboard shortcuts, consider exploring other customization options. Anki is highly adaptable, and with these new skills, you're well on your way to creating a learning environment tailored just for you. Happy learning!

AD