51 3
Contact Author Sign in to rate

Contanki - Controller Support for Anki (beta)

3.67MB. Updated 2023-02-02.
The author has shared 2 other item(s).

Description

Contanki allows Anki to be used with a gamepad or other controller device. Features:Please report any issues in the official support thread or the GitHub issue tracker. Usage Notes Connect your controller via USB or Bluetooth, install the add-on, restart Anki, and press any button to get started. Controls can be reassigned using the add-on's config dialog. You can assign controls for each context (review, deck browser, etc), as well as global settings that are used if a control isn't assigned to a particular context. It is suggested that you try the default control bindings to begin with, and make changes as needed. Since Anki has a lot of functions to map, Contanki features a quick select menu, which by default is shown using the right trigger. This will also pull up an overlay showing the control bindings for the current screen. You can remove any actions you don't need if the controls overlay is too cluttered. Support is provided for 2.1.45 and above, but please note the version specific issues below. Analog Sticks By default the right stick is used to move and click the mouse, and you can use L2 + right stick for a secondary click. It is only possible to click within Anki. The left stick is used to scroll and to navigate between views. Sticks can be reassigned and can also be put in 'button mode', where actions can be assigned to the directions of a stick. Choosing a Controller I have been testing using a DualShock 4, which makes a good choice and can be readily purchased secondhand at a reasonable price. The cheapest option would be a knockoff SNES controller, which can be found for $10 or less. Currently it is only possible to use a single controller at a time. This may include Joy-Cons depending on your system, but support for using both Joy Cons is planned. Testing This add-on is still in beta, so there may still be some bugs. Please report any issues in the official support thread or the GitHub issue tracker. If you encounter an issue, let me know what you were trying to do, what platform and controller you're using, and the text of any error or message your receive. You can also obtain some debug information by clicking the help button in the Contanki's config. Please take note of the known issues and don't report anything listed there. Suggestions are also welcome, and can also be raised on the issue tracker or forum. Known issues - Interaction outside of the main window (especially the browser and preferences) is only partially implemented - Clicking outside Anki or in the title or menu bars doesn't work - Add-on doesn't function in the profile window - Can't open or close webview context menus Version Specific: - Opening certain menus or dialogs prevents any actions from firing, until it's closed and they fire all at once. This mostly affectts Anki 2.1.49 and below. The above issue is mostly fixed in 2.1.50, but some dialogs may still prevent actions from firing Platform Specific - Volume controls only work on MacOS - Steam Deck is currently unsupported while we wait for Qt to upgrade to a newer Chromium version - Cursor control doesn't work on Linux Controller Specific - 8BitDo controllers should be set to X mode, but D mode might also work. More info here - If your 8BitDo controller isn't detected correctly try Tools > Controller Options > Detect 8BitDO Controllers Add-on compatibility - Not compatible with: - Anjoy - Has issues: - Customize Keyboard Shortcuts - a small number of actions rely on simulating a key press, and won't work if you've changed that shortcut. Instead you can create a custom action in the controller options using your assigned shortcut

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

1898790263

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools->Add-ons menu item, then click on Get Add-ons and paste in the code.

All Anki 2.1.x Add-Ons Contact Author

Reviews

on 1683173357
When I use custom study, it doesn't allow me to click on the good button or easy button when answering questions.
on 1681093834
Awesome application, can't recommend it enough if you want to connect your controller.
on 1681077559
works perfectly on xbox controller
on 1680624734
Great addon!

However, when doing Anki on a 2nd monitor, the "mouse" of the controller cannot be moved on that monitor, only the primary monitor. The only fix I have found is to change my display settings and make the 2nd monitor the primary. Is there any way to change this in the code so it works across all monitors without having to change settings in Windows?
on 1679162788
Very nice! A couple of questions - I am using an SNES controller, with, from "north" to "west", going clockwise, buttons X, A, B, Y. The colors are blue, red, yellow, and green, respectively. In the config settings, the colors are off, which I am assuming is because the images for the buttons in the settings are of Xbox controller buttons (green A, red B, yellow Y, blue X. This is fine; however, the mapping seems to also be off. The default for "Flip card" is X, but B seems to flip the card with the default settings.

Additionally, default settings for answers/ratings are X-good, A-again, B-hard, Y-easy. However, upon testing with these configurations, these buttons perform different actions: X-easy, A-again, B-good, and Y-hard.

Is there something I am missing or doing wrong?
on 1678622133
works easily has to setup the controls though
used DS4
on 1677655033
Good for the customizable button👍
on 1677618631
Finally was able to do what took me years to figure out
on 1676990666
Works well
on 1675506467
nice finally an alternative for anjoy from glutamite who doesnt care to update his addon in years
on 1675315464
Works great, thank you so much for this!
on 1675143835
keep going with the updates brilliant
on 1674833275
I will say I love this add on but it is very frustrating to have to change my settings everytime my 8BitDo reconnects, as they will change (in different capacities, sometimes it completely resets and sometimes it is only a few keys). For some reason it does not do this with my usb xbox 360 controller
I am on Windows 11
Comment from author
Thanks for reporting, this issue should be fixed with the latest update. If not, please post on the issue tracker so I can follow up.
on 1673309102
Firstly, let me start by saying thank you to the author for making this add on! As a med student, it has truly made life better.

Unfortunetly, custom settings get lost when closing anki. However, even so as a mac user this is still the best way to connect to my Joy-Con, and believe me, I cannot find a better alternative. Linked bellow is a thread with a fix posted by ewotions4. As of Jan 9, 2022 with the beta 13 version of this add on (also found on GIT Hub), this fix worked for me.

https://github.com/roxgib/anki-contanki/issues/41
on 1673125294
Settings keep resetting back to default after closing/re-opening Anki or if controller disconnects
Comment from author
This problem should now be fixed, thanks for reporting it
on 1672473137
It works well but my settings keep resetting back to default after closing/re-opening Anki. Anyone else have this problem?
on 1672085500
Very good add-on, thank you very much.

Some issues I encountered and some suggestions I'd like to make.

-You can't assign a button to scroll down. There are to scroll up options to choose.

-You can't reverse an axis of a stick. For example I hold Zero 2 sideways like a remote. I wanted to assign its X axis to vertical scrolling and its Y axis to horizontal scrolling. The problem is because I hold it side ways from the point I am holding when I press down, it scrolls up and vice versa. Did you get what I mean? If there was an option to reverse an axis of a stick this problem would be solved.

Thank you very much.
Comment from author
Thanks - the first issue should be fixed.

I'll look at adding an option to flip each axis.
on 1671312395
Good add on! However, recently been having a lot more issues. Not saving my custom settings, button's have been mapping incorrectly to controller, and no longer highlights which button is being pressed in the settings to know which button is mapped to which command. But great when works!
on 1670794942
Awesome addon to rival Anjoy. Seriously thank you

Most recent update solved a lot of issues but an issue I keep running into is that my custom controls (Right Joy Con) aren't saving without me coding it into the file myself.
on 1670405027
Does it support 8bitdo zero2?
It can be used in Windows with Bluetooth, and it is a controller suitable for writing at one speed due to its small size.
Comment from author
Yep! The latest update should improve compatibility with 8BitDO Zero's as I've recently gone and purchased one for testing (along with a few other controllers). If you do encounter any issues please post them on the issue tracker - https://github.com/roxgib/anki-contanki/issues
on 1670183075
10/10

*EDIT* OK figured out the custom buttons, that makes everything easy! This is the best add on, saved me from arthritis and carpal tunnel, for real owe you some coffee tea!

This is gold! Got a donation link? Smashing the spacebar was wrecking my fingers until I got the 8bitdo Zero.
One thing I'm looking for is a toggle function, normally the 'g' key on keyboard. Any way to do this at present? I might have overlooked it within the different settings.

Thank you for this glorious add on, brilliant work!
Comment from author before post was edited
Not yet, but I'll think about it <3.

Yeah... Karabiner is great for certain use cases, but it's definitely a pain for something like this.

You can add 'custom actions' in the controller preferences. Custom actions are just keyboard shortcuts - add them in the main preferences screen, and that action will then be available to be assigned to buttons on the controls screen.
on 1669913318
Thats was what we need 哈哈哈
on 1669645422
Thanks for a great ad on! However, when I try to set up my 8bitdo to "scroll up" or down, it 1) only lists options for scrolling up and 2) even scrolling up doesn't seem to work when I select it. Would love to scroll up/down on longer cards, especially when there's pictures. Thank you!
on 1668200839
Cool, it works and also customizable. Thanks so much
on 1667420698
Great add-on. Often doesn't work with the 8BitDo Zero 2 controller on mac. This seems to be mostly a problem with profile creation, as the controller will work and be detected in "macOS mode" but will show up as a dualshock. In "Xinput mode" the controller will initially function, but attempting to change the button mapping by opening profiles returns the following error. This doesn't make a ton of sense to me looking through the code, as only the test files include dualshock mapping but not 8bitdo mapping. The bluetooth when connected in xinput mode even comes up asVendor ID: 0x045E Product ID: 0x02E0. This is pretty annoying as even in previous versions where profile mapping would work, the 8bitdo zero in xinput mode would switch profiles back to default controllers with some frequency. Here's the main error code I get nowadays:

Caught exception:
Traceback (most recent call last):
File "aqt.addons", line 962, in onConfig
File "/Users/x/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 105, in on_config
ContankiConfig(focus, self.profile)
File "/Users/x/Library/Application Support/Anki2/addons21/1898790263/config.py", line 100, in __init__
self.options_page = OptionsPage(self)
File "/Users/x/Library/Application Support/Anki2/addons21/1898790263/config.py", line 239, in __init__
self.profile_bar = self.ProfileBar(parent)
File "/Users/x/Library/Application Support/Anki2/addons21/1898790263/config.py", line 309, in __init__
self.profile_combo.setCurrentIndex(p_list.index(self.profile.name))
ValueError: '8BitDo Zero' is not in list
on 1667013167
Great addon! Makes reviewing cards much more ergonomic when you have a controller, and supports a wide variety. I do wish there was an option to keep the modifier keys over the radial menu. I find myself often aiming at the wrong menu with the quick select popup.
Comment from author
Thanks for the feedback. The modifier keys were causing a lot of issues, but they may return in a more limited fashion in the future.
on 1666316101
Much more functional than joy2key. Works with Xbox SeriesX and Dualshock 4 Controllers on both Mac and Windows 11. Thank you so much for making this
on 1666189720
I'm working on the latest version of Mac OS with an Xbox Elite Controller Series 2, the buttons A and B work fine, but the rest of the buttons do not work properly. Every time I push the X button the Add-on thinks im pressing Y same with LB and other buttons.
Comment from author
Thanks for letting me know - would you be able to open an issue so I can collect some info from you to get this fixed?

https://github.com/roxgib/anki-contanki/issues
on 1665262076
OMG !!!!!! one of the best addons
THANK YOU ♥♥
on 1665048503
Suggestion: Could you add a combined option for easy, hard etc. that includes "enter"? So you don't need to press enter seperatelly to turn the cards.

PRO: Epic addon! Really has everything one could wish for and also works reasonably well for its age. Support for the main controllers and direct binding of anki functions. SUPER NICE! I was waiting for this for a long time!

Con: There are still a range of bugs. Particularly when using full screen swaps. Nonetheless, the pros already outweigh the cons by far :) Keep up the good work!!
Comment from author
There is an "Enter" action already that's intended to do whatever the enter key does on that particular screen. If you mean that you want to be able to answer easy, hard etc without flipping the card, try creating custom actions with the sequence of keys required e.g. Enter, 1. There is also an add-on that allows you to answer the cards without flipping them, I've tried to avoid duplicating functionality that other add-ons already provide.
on 1664218866
Great app but same error as other users. Comments below the error.

Would also like to point out that a 8BitDo Zero 2 connected via bluetooth "(Windows X - input)" is recognized as a xbox controller and not a 8BitDo Zero.

"Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 5.14.1 PyQt 5.14.1
Platform: Mac 12.4
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-09-06 01:29:07
Add-ons possibly involved: ⁨Contanki - Controller Support for Anki beta⁩

Caught exception:
Traceback (most recent call last):
File "aqt.webview", line 42, in cmd
File "aqt.webview", line 149, in _onCmd
File "aqt.webview", line 618, in _onBridgeCmd
File "aqt.hooks_gen", line 4358, in __call__
File "/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 122, in on_receive_message
funcs[func](*args)
File "/Users/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 63, in on_connect
self.mods = [False] * len(self.profile.mods)
AttributeError: 'NoneType' object has no attribute 'mods'"

Note, this happens when I connect to the addon with the 8BitDo Zero 2 controller (Android Mode). When I connect via "Keyboard Mode" the controller is not recognized. When I connect via "Windows (X - input)" the key mapping is all over the place since the addon thinks the controller is an xbox.
on 1664193392
This addon is so perfect and efficient. Having the overlays is genius.
Is there a way to switch windows with the controller? Sometimes I like to open the "edit card" window but go back to reviewing and edit the card when I'm done reviewing. With the controller I can hit R1 to edit the card, but then how can I return focus to the main window to continue reviewing?
on 1663779675
Hi!
I had the same problem as a previous user with this error:
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 5.14.1 PyQt 5.14.1
Platform: Mac 12.4
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-09-06 01:29:07
Add-ons possibly involved: ⁨Contanki - Controller Support for Anki beta⁩

Caught exception:
Traceback (most recent call last):
File "aqt.webview", line 42, in cmd
File "aqt.webview", line 149, in _onCmd
File "aqt.webview", line 618, in _onBridgeCmd
File "aqt.hooks_gen", line 4358, in __call__
File "/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 122, in on_receive_message
funcs[func](*args)
File "/Users/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 63, in on_connect
self.mods = [False] * len(self.profile.mods)
AttributeError: 'NoneType' object has no attribute 'mods'

I can say that I managed to fix it by doing the following things
Restarting my controller (SN30 Pro), deleting the addon and reinstalling it, and deleting the Bluetooth device from device manager, and then repairing everything again. Works like a charm!
Comment from author
Thanks for reporting this, it should now be fixed.
on 1662444488
Great but today, received this error message and no longer works. I've tried uninstalling my controller, deleting the add-on, restarting anki etc. Nothing has worked. 8bit controller

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 5.14.1 PyQt 5.14.1
Platform: Mac 12.4
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-09-06 01:29:07
Add-ons possibly involved: ⁨Contanki - Controller Support for Anki beta⁩

Caught exception:
Traceback (most recent call last):
File "aqt.webview", line 42, in cmd
File "aqt.webview", line 149, in _onCmd
File "aqt.webview", line 618, in _onBridgeCmd
File "aqt.hooks_gen", line 4358, in __call__
File "/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 122, in on_receive_message
funcs[func](*args)
File "/Users/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 63, in on_connect
self.mods = [False] * len(self.profile.mods)
AttributeError: 'NoneType' object has no attribute 'mods'
Comment from author
Thanks for reporting this, it should now be fixed.
on 1662066207
the best addon EVER!!! I synced my Joycon to my computer, and it immediately started working!!! I love that I am able to change the button mapping to something that more suits my needs. I think it would be really cool if we could turn off modifiers so I could use those keys as well. I don't use the modifier function, but I would love to use the trigger to flip the card and mark it as "good." As much as I would appreciate this functionality, this addon is still amazing!!!
Comment from author
You can assign different keys to be modifiers, although they can't be disabled at the moment. An upcoming version will replace the modifier keys with a radial menu, so you'll be able to reassign all the buttons.
on 1662043360
Hey man thanks for the awesome anki controller support
I happen to have a problem with it, im using 8bit zero 2, and the scroll up and down action is broken:
In short, it doesnt scroll when i press the button it goes all the way down or all the way up
And i didnt find any option to tune it down, the « scroll speed » option doesnt change anything
So no matter the vertical size of my card, using the up and down button doesnt allow me to read it properly as it immediatly goes from the top of the card to the bottom in one push of the button.

Is there a way to fix that ?
Thanks a lot !
on 1661818602
Great add-on! Can you add mapping for the 8BitDo N30 controller? Thanks!
on 1661030116
amazing addon that makes it so easy to use a controller. Maybe I was just unable to find it, but I was wondering if there are plans to add in a key for revealing hints. Thank you for this add on!
Comment from author
You can use this add-on - see you reviews if it doesn't work with the latest version:
https://ankiweb.net/shared/info/1844908621
You can then add a custom action in settings that trigger the appropriate shortcut (H or G)
on 1659525566
great
on 1659449273
Can you add support to turn off light bar in dual shock 4 ? it's really irritating
Comment from author
Yeah this annoys me too, but unfortunately the API doesn't support controlling the light. It's possible with other software - on Windows DS4Windows lets you turn off the light and on Mac (and Windows) it can be done with Steam. Not super convenient but it does work.
on 1656639107
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.53 (96bacf79) Python 3.9.7 Qt 5.15.2 PyQt 5.15.5
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-06-30 02:35:44

Caught exception:
Traceback (most recent call last):
File "aqt.webview", line 42, in cmd
File "aqt.webview", line 149, in _onCmd
File "aqt.webview", line 613, in _onBridgeCmd
File "aqt.hooks_gen", line 4323, in __call__
File "C:\Users\victo\AppData\Roaming\Anki2\addons21\1898790263\contanki.py", line 103, in on_receive_message
funcs[func](*args)
File "C:\Users\victo\AppData\Roaming\Anki2\addons21\1898790263\contanki.py", line 47, in on_connect
self.buttons = [False] * buttons
TypeError: can't multiply sequence by non-int of type 'str'

Can you help?
Comment from author
This issue should already be resolved in the update I pushed yesterday. If it's still not working for you, try reinstalling the add-on to make sure you have the latest version, and if it still doesn't work it would be great if you could post on GitHub as it's easier to discuss the issue on there. Thanks for reporting the problem!

https://github.com/roxgib/anki-contanki/issues
on 1656578968
error

错误
有一个错误发生了.请在按住shift键的同时启动Anki,这样可以临时的禁用您已经安装的插件。
如果仅仅是因为插件引起的问题,请选择工具>插件菜单项来将出错的的插件设置成失效,然后重启Anki,重复以上的步骤直到你发现了具体是哪个插件引起的问题。
当你已经发现是因为插件引起的问题,请在我们的支持网站上 [插件支持](https://help.ankiweb.net/discussions/add-ons/) 上报告问题。
调试信息:
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-06-29 17:37:59
相关扩展:⁨Contanki - Controller Support for Anki beta⁩

Caught exception:
Traceback (most recent call last):
File "aqt/webview.py", line 41, in cmd
File "aqt/webview.py", line 142, in _onCmd
File "aqt/webview.py", line 589, in _onBridgeCmd
File "aqt/hooks_gen.py", line 4034, in __call__
File "/Users/lingyi/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 103, in on_receive_message
funcs[func](*args)
File "/Users/lingyi/Library/Application Support/Anki2/addons21/1898790263/contanki.py", line 47, in on_connect
self.buttons = [False] * buttons
TypeError: can't multiply sequence by non-int of type 'str'
Comment from author
这个问题应该被昨天的更新已经解决了。如果你还有问题重新安装。 还有问题的话我建议你在GitHub上发帖,比较容易沟通。谢谢你告诉我有这个问题

https://github.com/roxgib/anki-contanki/issues
on 1655615416
Works amazingly well.
on 1653882388
I have been using it for about an hour with my Xbox controller on Windows. I do not see any problems so far. I could comfortably lie on my gaming chair while going over the cards. 10/10
on 1651747496
Great addon! Much more stable than Joymapper :)
on 1651699952
10/10
on 1651583944
Phenomenal addon!
on 1651583939
This works impressively well and the dialog is incredibly clean. I will be adding this to all my Recommended add-ons pages :)
- The AnKing
Comment from author
Thanks! Don't hesitate to pass on any feedback 😁
on 1650543893
Connects easier than most of my games! Thanks so much for making the overlays, they're genius.

I don't know if it's possible, but in some future update it would be cool for the controller to vibrate when you get a question wrong, like when you take damage in a game.
Comment from author
This will probably be added at some point, though my priority right now is ensuring controller and platform compatibility rather than new features. Still, thanks for the feedback!
on 1650262609
Great idea, thanks!
on 1650070296
Ever since switching from using a PC to a Mac, I tried many different ways to connect my controller to Anki. THIS IS THE ONLY THING THAT WORKS!! THANK YOU FOR MAKING ANKI SO MUCH MORE FUN AND EASY!!
on 1649679211
It's a must have!!!
on 1649634750
It works very well! Thank you very much!
on 1649511609
Nice work :)