add pause and seek forward/back shortcuts to review screen
This commit is contained in:
parent
d54f719558
commit
8236f800ae
@ -291,8 +291,22 @@ The front of this card is empty. Please run Tools>Empty Cards."""
|
|||||||
("2", lambda: self._answerCard(2)),
|
("2", lambda: self._answerCard(2)),
|
||||||
("3", lambda: self._answerCard(3)),
|
("3", lambda: self._answerCard(3)),
|
||||||
("4", lambda: self._answerCard(4)),
|
("4", lambda: self._answerCard(4)),
|
||||||
|
("5", self.on_pause_audio),
|
||||||
|
("6", self.on_seek_backward),
|
||||||
|
("7", self.on_seek_forward),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def on_pause_audio(self):
|
||||||
|
av_player.toggle_pause()
|
||||||
|
|
||||||
|
seek_secs = 5
|
||||||
|
|
||||||
|
def on_seek_backward(self):
|
||||||
|
av_player.seek_relative(-self.seek_secs)
|
||||||
|
|
||||||
|
def on_seek_forward(self):
|
||||||
|
av_player.seek_relative(self.seek_secs)
|
||||||
|
|
||||||
def onEnterKey(self):
|
def onEnterKey(self):
|
||||||
if self.state == "question":
|
if self.state == "question":
|
||||||
self._getTypedAnswer()
|
self._getTypedAnswer()
|
||||||
@ -696,6 +710,9 @@ time = %(time)d;
|
|||||||
[_("Options"), "O", self.onOptions],
|
[_("Options"), "O", self.onOptions],
|
||||||
None,
|
None,
|
||||||
[_("Replay Audio"), "R", self.replayAudio],
|
[_("Replay Audio"), "R", self.replayAudio],
|
||||||
|
[_("Pause Audio"), "5", self.on_pause_audio],
|
||||||
|
[_("Audio -5s"), "6", self.on_seek_backward],
|
||||||
|
[_("Audio +5s"), "7", self.on_seek_forward],
|
||||||
[_("Record Own Voice"), "Shift+V", self.onRecordVoice],
|
[_("Record Own Voice"), "Shift+V", self.onRecordVoice],
|
||||||
[_("Replay Own Voice"), "V", self.onReplayRecorded],
|
[_("Replay Own Voice"), "V", self.onReplayRecorded],
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user