From 53f2d2e726f33b45477bd4e08675d54397eeedba Mon Sep 17 00:00:00 2001 From: Rodri Sanchez Date: Mon, 4 Dec 2023 15:30:00 -0300 Subject: [PATCH] Define Z_KEY_CODE and Y_KEY_CODE constants --- src/components/Board/Output/Output.container.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Board/Output/Output.container.js b/src/components/Board/Output/Output.container.js index 0155fbfaf..ea3b4827c 100644 --- a/src/components/Board/Output/Output.container.js +++ b/src/components/Board/Output/Output.container.js @@ -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(