That was a nice little exercise, first time I am working with JS.
In case someone else is looking for a quick solution, this did the trick (I also added ESC to close the lightbox):
window.addEventListener("keydown", (event) => {
switch (event.key) {
case "ArrowRight":
document.getElementsByClassName("am-gallery-lightbox-next")[0].click();
break;
case "ArrowLeft":
document.getElementsByClassName("am-gallery-lightbox-prev")[0].click();
break;
case "Escape":
document.getElementsByClassName("am-gallery-lightbox-close")[0].click();
break;
}
});