Skip to content

Commit

Permalink
Define Z_KEY_CODE and Y_KEY_CODE constants
Browse files Browse the repository at this point in the history
  • Loading branch information
RodriSanchez1 committed Dec 4, 2023
1 parent a321790 commit 53f2d2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Board/Output/Output.container.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,11 @@ export class OutputContainer extends Component {
};

handleRepeatLastSpokenSentence = event => {
const Z_KEY_CODE = 90;
const Y_KEY_CODE = 89;
if (
(event.ctrlKey && event.shiftKey && event.keyCode === 90) ||
(event.ctrlKey && event.keyCode === 89)
(event.ctrlKey && event.shiftKey && event.keyCode === Z_KEY_CODE) ||
(event.ctrlKey && event.keyCode === Y_KEY_CODE)
) {
const { output } = this.props;
const lastSpokenSymbol = output.findLast(
Expand Down

0 comments on commit 53f2d2e

Please sign in to comment.