Back

Gamepad control plugin for Anki (Linux)!

#1
Hey guys, so I was inspired by this thread about using a gamepad to go through Anki reviews, and ended up writing a plugin for Anki to do this.

Right now it works only under Linux (haven't tried MacOSX), mostly because pygame has some event handling discrepancies differences between Linux and Windows. At some point I'll probably make an effort to get it to run on other systems, but I figured all the cool Linux users will appreciate it now Tongue

I've been using it for several days now, it's so much easier to use for answering than keyboard and mouse Big Grin

[Image: gamepad.png]
Edited: 2010-09-26, 3:20 pm
Reply
#2
Neat!
Reply
#3
If only I had a game controller to try it out with!
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
Thanks a lot! Smile
Reply
#5
May I suggest adding a combo meter and Quake sound effects?

You get ten cards correct in a row: "Unstoppable!"
Reply
#6
I want to use my old Nintendo Power Glove w/ Anki.
Reply
#7
interesting
Reply
#8
harhol Wrote:May I suggest adding a combo meter and Quake sound effects?

You get ten cards correct in a row: "Unstoppable!"
You laugh, but I was seriously considering this to make Anki more game-like. Light gun support would be fun too for the more violent types Big Grin
Reply
#9
This is an excellent plugin. Thank you very much for your efforts.

Not much luck in windows xp though Sad Here are my installation notes for getting it to work on Windows XP 32 bit:

Install in the following order:
1. python-3.1.3.msi
2. PyQt-Py3.1-x86-gpl-4.8.2-1.exe
3. pygame-1.9.1.win32-py3.1.msi

Next copy the ankijoy.py to anki/plugins

...But not much luck XD. I tried Tried to change the line in Anjijoy.py to:
"from PyQt4 import pygame"

But still no luck. The error message from Anki is:
----------------------------------------------------------
An error occurred in a plugin. Please contact the plugin author.
Please do not file a bug report with Anki.

Traceback (most recent call last):
File "ankiqt\ui\main.pyc", line 2472, in loadPlugins
File "C:\Documents and Settings\EdgarReneFigaro\anki\plugins\ankijoy.py", line 23, in
ImportError: cannot import name pygame




Thanks for your help Smile
Reply
#10
Yeah, first of all, you can't run it with Python 3+ because Anki uses Python 2.x. Latest version of Anki uses 2.7 I believe. Secondly, it won't work because the way pygame processes Joystick input is different (and kind of broken IMO) under Windows. It will only work if there is a pygame window up.

So yeah, no easy way to get it to run on Windows.
Reply