Skip to content

Instantly share code, notes, and snippets.

@Elshaman
Created June 19, 2023 00:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Elshaman/9a3047e49775c0f254bea9628dd83924 to your computer and use it in GitHub Desktop.
Save Elshaman/9a3047e49775c0f254bea9628dd83924 to your computer and use it in GitHub Desktop.
Ejemplo Rxjs con teclas
import { fromEvent } from "rxjs";
const onKeyDown$ = fromEvent(document , "keydown")
const observadorMouse = {
next: (event) =>{
console.log(event.key)
}
}
onKeyDown$.subscribe(observadorMouse)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment