@@ -209,13 +209,26 @@ fn handle_keyboard_inputs(
209209 } else if keyboard_input. just_released ( KeyCode :: Space ) {
210210 crate :: viewer:: control:: ControlView :: play_or_pause ( & mut midi_state, & mut play_control_evts) ;
211211 } else if keyboard_input. just_released ( KeyCode :: Return ) {
212- crate :: viewer:: control:: ControlView :: play_or_stop ( & mut midi_state, & mut play_control_evts) ;
212+ crate :: viewer:: control:: ControlView :: stop ( & mut midi_state, & mut play_control_evts) ;
213213 } else if keyboard_input. just_released ( KeyCode :: Backslash ) {
214214 crate :: viewer:: control:: ControlView :: toggle_layout_mode ( & mut app_state, & mut settings, & mut theme) ;
215215 } else if keyboard_input. just_released ( KeyCode :: M ) {
216216 crate :: viewer:: control:: ControlView :: toggle_show_melody_syllable ( & mut app_state, & mut settings, & mut theme) ;
217217 } else if keyboard_input. just_released ( KeyCode :: F ) {
218218 crate :: viewer:: control:: ControlView :: toggle_always_show_fret ( & mut app_state, & mut settings, & mut theme) ;
219+ } else if keyboard_input. just_released ( KeyCode :: L ) {
220+ settings. should_loop = !settings. should_loop ;
221+ crate :: viewer:: control:: ControlView :: sync_should_loop (
222+ & settings,
223+ & mut midi_state,
224+ & mut play_control_evts,
225+ ) ;
226+ } else if keyboard_input. just_released ( KeyCode :: A ) {
227+ crate :: viewer:: control:: ControlView :: set_begin_bar_ordinal ( & mut midi_state, & mut play_control_evts) ;
228+ } else if keyboard_input. just_released ( KeyCode :: B ) {
229+ crate :: viewer:: control:: ControlView :: set_end_bar_ordinal ( & mut midi_state, & mut play_control_evts) ;
230+ } else if keyboard_input. just_released ( KeyCode :: C ) {
231+ crate :: viewer:: control:: ControlView :: clear_begin_end ( & mut midi_state, & mut play_control_evts) ;
219232 }
220233}
221234
0 commit comments