cyclejs-community/cycle-keyboard

Name: cycle-keyboard

Owner: Cycle.js Community

Description: A keyboard driver for cycle.js

Created: 2016-07-05 13:18:57.0

Updated: 2017-11-16 03:33:04.0

Pushed: 2017-08-15 17:23:14.0

Homepage: null

Size: 366

Language: TypeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

cycle-keyboard

A keyboard driver for cycle.js. View Demo

npm versionlicense

Usage

Install the package using node package manager

m install cycle-keyboard@1.0.0-rtm.4

Import the driver in your cycle app

rt { makeKeyboardDriver } from 'cycle-keyboard'

t drivers = {
.
yboard: makeKeyboardDriver()

Subscribe to keyboard-related event streams on the driver

tion main({ ..., keyboard }) {
nst keyUp$ = keyboard.ups().map(ev => ev.displayKey + ' was pressed');

The driver provides the following xstream streams:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.