Keyboard Shortcut to Add Horizontal Lines

Is there a way keyboard shortcut to add horizontal lines (both in the editor and during Review through the Edit Card During Review addon) without having to go to HTML?

Kind of like this line here


Hello @DerIshmaelite

As far as i know, there is no option to do this with the basic version of Anki Desktop. However, you can install the Addon Mini Format Pack to achieve this.

This Addon will add a Button to your editing screen, which looks like this:

Light-Mode:
grafik
Dark-Mode
grafik

Clicking it will insert an <hr> element at the position of your cursor. This function is also available as a shortcut. The default shotcut is “Ctrl + Shift + Alt + _”. If this default shortcut does not work (as was the case for me), try modifying the shortcut in the configuration settings of the addon.

Hope this helps!

Cheers :grinning:

3 Likes

ah great!! Thank you for the reply!! Does this work as well during reviewing (with the Edit Card During Review) :question:

Well it depends what you mean by that. You will have to enter the edit mode, which you can either do from the card browser or while reviewing the card by clicking the edit button or pressing the default shortcut “e”.

The shortcut won’t however work together with the Edit Field During Review Addon, if thats what you mean.

1 Like

The shortcut won’t however work together with the Edit Field During Review Addon, if thats what you mean.

Yes indeed that is what I meant…bummer :sweat: Well I have contacted the author on GitHub to see if I could get him to add this feature. Thanks a lot for the help though :pray:

1 Like

wOOhooOo

Author just said that this code should do the trick and it did. It works beautifully. Thanks a lot for the help @Hildeguard !

"insertHR": {
    "arg": {
        "type": "text",
        "value": "<hr>"
    },
    "command": "insertHTML",
    "enabled": true,
    "shortcut": "Ctrl + -"
},

3 Likes

Ah thats very interesting :nerd_face:

Thanks for the info!

what is your new shortcut ?
Its not working for me also

I’ve gone with “ctrl+shift+l”

Hope this helps!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.