summaryrefslogtreecommitdiff
path: root/9kwpyqt.py
diff options
context:
space:
mode:
Diffstat (limited to '9kwpyqt.py')
-rwxr-xr-x9kwpyqt.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index 039ca1c..3529077 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -115,6 +115,8 @@ class CaptchaGUI(QWidget):
self.timer.timeout.connect(self.onTimeout)
self.timer.setSingleShot(True)
+ self.startstopButton.setFocus()
+
##################################################
# Handle gui
##################################################
@@ -140,6 +142,8 @@ class CaptchaGUI(QWidget):
elif key == Qt.Key_Enter or key == Qt.Key_Return:
if self.skipButton.hasFocus():
self.skipCaptcha()
+ elif self.startstopButton.hasFocus():
+ self.toggleRunning()
else:
self.submitCaptcha()
@@ -302,9 +306,10 @@ class CaptchaGUI(QWidget):
if not answer:
skip = True
self.timer.stop()
- self.setCaptchaAnswer(answer, skip)
self.captchaInputLine.setText("")
self.removeCaptchaImage()
+ if self.currentCaptchaID:
+ self.setCaptchaAnswer(answer, skip)
def onTimeout(self):
self.running = False