Permalink
Browse files

no default answer

  • Loading branch information...
1 parent 552c29b commit cfc1ada285c45d8978ca8c6215a40d3f76982897 @dae committed Apr 24, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 nodefaultanswer.py
View
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+# Copyright: Damien Elmes <anki@ichi2.net>
+# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
+#
+# Set focus to middle area when answer shown, so space does not trigger the
+# answer buttons.
+#
+
+from aqt import mw
+from anki.hooks import addHook
+
+def noAnswer():
+ mw.reviewer.web.setFocus()
+
+addHook("showAnswer", noAnswer)

0 comments on commit cfc1ada

Please sign in to comment.