C2LC-428: Add a keyboard shortcut to replace a step

Metadata

Source
C2LC-428
Type
Task
Priority
N/A
Status
Done
Resolution
N/A
Assignee
N/A
Reporter
Created
2021-07-20T09:52:43.399-0400
Updated
2022-05-19T15:30:57.351-0400
Versions
N/A
Fixed Versions
  1. Coding Env 1.4
Component
N/A

Description

Suggested by Ari that we should have keyboard shortcuts for all the items in the control panel.

We will make the following changes:

  • Make changes to the Replace button in the control panel
    • Remove the replacement focus cycle: the Replace button always does replacement (if there is a selection)
    • The Replace button is enabled when there is a selected action and disabled if there is no selected action
    • We make the replacement and announce it even when the selected action is the same as the current block
    • We keep the current behaviour of not showing the Replace button in the control panel for loop blocks
  • Add a Replace keyboard shortcut
    • Ctrl + Alt + c
    • If there is no selected action: announce "no action selected"
    • If the current program step is a loop block: announce "replace is not available for loops"
    • Otherwise: make the replacement and announce the replacement, even if it is the same action

Additionally, we will add the following announcements for the movement shortcut:

  • Add an announcement whenever movement isn't possible
    • "At the end of the program, unable to move right"
    • "At the beginning of the program, unable to move left"