Dec. 19, 2023, 8:20 p.m. | JT Dev

DEV Community dev.to

What it was

In the last update of Stimulus v3.2.2, the ability to filter the event by PageDown and PageUp keys was added.


Before that, in v3.2.1, it looked like this:



<div data-action="keyup->myController#myfunction"></div>


and some like this...



import { Controller } from "stimulus";

export default class extends Controller {
connect() {
// Add a keydown event listener when the controller is connected to the DOM
document.addEventListener("keydown" …

data event export filter import keyboard keys stimulus update

Software Engineer for AI Training Data (School Specific)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Python)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Tier 2)

@ G2i Inc | Remote

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US