Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more
Module

x/lunchbox/src/handlers.ts

Component Library 🍱 for Deno πŸ¦• Fresh πŸ‹
Latest
import * as lunchbox from "https://deno.land/x/lunchbox@v1.0.2/src/handlers.ts";

This module contains all functions that help handle event listeners in islands.

Variables


handleInteraction

This function is a shorthand for the onClick and onKeyDown ("Enter" key) event listeners.


handleKeyboard

Function to handle keyboard events based on an array of keystroke combinations. It checks each keystroke combination and executes the associated callback if the combination is detected.


Key

A utility object to easily check if certain keys are being pressed during onkeydown events. This object provides methods to check for common special keys like Enter, Backspace, Shift, etc., and also includes methods to handle modifier keys specific to different operating systems (Windows and macOS).