Skip to content

Commit

Permalink
add key bind
Browse files Browse the repository at this point in the history
  • Loading branch information
promto-c committed Aug 20, 2023
1 parent 2619cc6 commit b3cd3d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions player.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def _setup_signal_connections(self):
self.current_frame_spin_box.valueChanged.connect(self.set_frame)
self.frame_slider.valueChanged.connect(self.set_frame)

self.key_bind('j', self.play_backward)
self.key_bind('k', self.stop_playback)
self.key_bind('l', self.play_forward)

def key_bind(self, key_sequence: str, function: Callable):
# Create a shortcut
shortcut = QtWidgets.QShortcut(QtGui.QKeySequence(key_sequence), self)
Expand Down

0 comments on commit b3cd3d6

Please sign in to comment.