Pasting the sketch below on My Sketch - OpenProcessing action1() is invoked normally: ![]()
'use strict';
const keys = {
ArrowUp: action1
};
function setup() {
background(100);
}
function action1() {
console.info('ArrowUp detected!');
}
function keyPressed() {
print(`Key ${ key } pressed!`);
const funct = keys[key];
if (funct) {
print(funct);
funct();
}
}