Pavlovia not recognizing 'backspace' key

In order to fix this issue, we (meaning my nerd friend) adapted the source code, which is available here:
https://psychopy.github.io/psychojs/core_EventManager.js.html

The only thing missing in the source code is:

8: "Backspace",

Put it somewhere around line 370 of the aforementioned code and paste the whole thing into the beginning of your experiment.

You will need to pull up some of the initializations, so that (starting from line ~16):

import { core, data, sound, util, visual, hardware } from './lib/psychojs-2024.2.4.js';
``
const { PsychoJS } = core;
const { Clock, MonotonicClock } = util;
const { TrialHandler, MultiStairHandler } = data;
const { Scheduler } = util;

//some handy aliases as in the psychopy scripts;
const { abs, sin, cos, PI: pi, sqrt } = Math;
const { round } = util;

// Start code blocks for 'Before Experiment'
// init psychoJS:
const psychoJS = new PsychoJS({
debug: true
});

and remove the interfering bits (anything like “const psychoJS”) from your code further down.

The last thing we did was (in line 550. So, at the very end of the source code) one line:
const eventManager = new EventManager(psychoJS);

I haven’t found a way around manually adapting psychoJS.eventManager.etc to eventManager.etc every time I compile again. But it works.

Thanks
Jonathan

Forgot to mention:
We removed this part:
export class BuilderKeyResponse
{
constructor(psychoJS)
{
this._psychoJS = psychoJS;
``
this.status = PsychoJS.Status.NOT_STARTED;
this.keys = []; // the key(s) pressed
this.corr = 0; // was the resp correct this trial? (0=no, 1=yes)
this.rt = []; // response time(s)
this.clock = new Clock(); // we'll use this to measure the rt
}
}
I don’t think we use the BuilderKeyResponse, and he said it may be defined somewhere else, but maybe this is important for you - you would have to define it before using it, possibly.