# Make "ctrl" + "+"/"-" zoom in/out

**URL:** <https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312>\
**Category:** Suggestions\
**Created:** [July 21, 2024, 1:19am UTC](https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312 "2024-07-21T01:19:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timurama](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@Timurama](https://forums.ankiweb.net/u/Timurama)\
**Post date:** [July 21, 2024, 1:19am UTC](https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312/1 "2024-07-21T01:19:39Z")

</div>

Hello. it disappointed me that when i tried to use ctrl and + or - combination anki didn’t respond by zooming my card, but you can do that on browsers, it’s awkward for me to use mouse, i’d like to be able to zoom on just the keyboard, please implement this little shortcut in the next update, if it’s possible. yoroshiku onegaishimasu.

---

<div class="post-metadata">

**Author:** ![eroscard](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/eroscard/32/22632_2.png) [@eroscard](https://forums.ankiweb.net/u/eroscard)\
**Post date:** [July 21, 2024, 4:38pm UTC](https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312/2 "2024-07-21T16:38:02Z")

</div>

This addon can help you

[https://ankiweb.net/shared/info/1923741581](https://ankiweb.net/shared/info/1923741581)

---

<div class="post-metadata">

**Author:** ![Shigeyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/shigeyuki/32/23878_2.png) [@Shigeyuki](https://forums.ankiweb.net/u/Shigeyuki)\
**Post date:** [July 21, 2024, 7:11pm UTC](https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312/3 "2024-07-21T19:11:22Z")

</div>

Thanks for the mention, all the Zoom add-ons were broken so I fixed it.

I think the `Ctrl + +` and `Ctrl + -` not working is a bug in PyQt that Anki is using, maybe a similar problem was reported in PyQt. (I forgot the URL)

The `Ctrl + + ` works on the old Anki, but not on the new Anki, so I have changed it to `Ctrl + Shift + +` and `Ctrl + Shift + +` in the fixed add-on.

Basically there is no workaround for the PyQt bug, it may be possible to solve this problem by using JavaScript, but I have not tried it.

You can change the shortcut key to any key you like in the options. (Except `Ctrl + + `)

- tools → Zoom 24

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [July 24, 2024, 3:07pm UTC](https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312/4 "2024-07-24T15:07:39Z")

</div>

Anki doesn’t define the shortcuts by default, since they conflict, and don’t seem to work on certain keyboard layouts: [View menu by RumovZ · Pull Request #1668 · ankitects/anki · GitHub](https://github.com/ankitects/anki/pull/1668#issuecomment-1044058021)

---

<div class="post-metadata">

**Author:** ![eroscard](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/eroscard/32/22632_2.png) [@eroscard](https://forums.ankiweb.net/u/eroscard)\
**Post date:** [August 24, 2024, 10:49am UTC](https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312/5 "2024-08-24T10:49:14Z")

</div>

Shigeyuki, I think I discovered the zoom problem, if you put ctrl+= it will work like ctrl+

I tested it by doing the code below

```auto
from aqt import mw
from aqt.qt import QShortcut, QKeySequence

def zoom_in():
    current_zoom = mw.web.zoomFactor()
    new_zoom = min(current_zoom + 0.1, 3.0)
    mw.web.setZoomFactor(new_zoom)

def zoom_out():
    current_zoom = mw.web.zoomFactor()
    new_zoom = max(current_zoom - 0.1, 0.1)
    mw.web.setZoomFactor(new_zoom)

def setup_shortcuts():
    zoom_in_shortcut = QShortcut(QKeySequence("Ctrl+="), mw)
    zoom_in_shortcut.activated.connect(zoom_in)

    zoom_out_shortcut = QShortcut(QKeySequence("Ctrl+-"), mw)
    zoom_out_shortcut.activated.connect(zoom_out)

setup_shortcuts()

```

---

<div class="post-metadata">

**Author:** ![Shigeyuki](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/shigeyuki/32/23878_2.png) [@Shigeyuki](https://forums.ankiweb.net/u/Shigeyuki)\
**Post date:** [August 24, 2024, 12:21pm UTC](https://forums.ankiweb.net/t/make-ctrl-zoom-in-out/47312/6 "2024-08-24T12:21:28Z")

</div>

Hi, thanks for reporting the problem.  
The shortcut key problem is maybe due to PyQt and is difficult to fix, so I recommend customizing it and using different keys.
