Change the shortcut for the reject button

Hi :slight_smile:

Is it possible to change the shortcut for the reject button? So for instance the shortcut is not β€œx” but the number β€œ3”?

P.s. Thanks for a great tool! :slight_smile:

Thanks! It turned out to be a bit trickier than I thought to allow changing the keyboard shortcuts at runtime, so I haven’t implemented that yet. But in the meantime, you could probably use a workaround similar to this one:

You can use this handy tool to find the codes for different keys. The code for the x key would be 88.

Within the event listener block, you should then be able to add something like this to submit a β€œreject” answer if the 3 key is pressed:

if (event.keyCode === 51) {  // key code for "3"
    window.prodigy.answer('reject')
}

(Just keep in mind that the number keys are also used in the choice interface to allow selecting the different options. So if you’re using that interface, you might get a clash here.)