Skip to content

Commit

Permalink
rc. Implemented quick re-record from the latest checkpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed May 21, 2023
1 parent 1360690 commit 1bb22a1
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions iamreader/rc/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ def record(event: Event, *, ui: 'RemoteControlUi'):
ui.rc.cmd_record()


def rerecord(event: Event, *, ui: 'RemoteControlUi'):
ui.rc.cmd_stop()
ui.rc.cmd_to_label_prev()
ui.rc.cmd_record()


def stop(event: Event, *, ui: 'RemoteControlUi'):
ui.rc.cmd_stop()

Expand Down Expand Up @@ -54,6 +60,16 @@ def label_next(event: Event, *, ui: 'RemoteControlUi'):


SHORTCUTS: List[Shortcut] = [
Shortcut(
keys=['e'],
hint='Add a checkpoint',
func=partial(label_action, action=CheckpointAction())
),
Shortcut(
keys=['t'],
hint='Record from previous label',
func=rerecord
),
Shortcut(
keys=['a'],
hint='Record',
Expand All @@ -74,11 +90,6 @@ def label_next(event: Event, *, ui: 'RemoteControlUi'):
hint='Go to next label',
func=label_next
),
Shortcut(
keys=['e'],
hint='Add a checkpoint',
func=partial(label_action, action=CheckpointAction())
),
Shortcut(
keys=['w'],
hint='Mark a new chapter',
Expand Down

0 comments on commit 1bb22a1

Please sign in to comment.