angular-keyboard

Keyboard behavior for AngularJS Webapps
1 person uses it
Author: 207248?v=2 bfanger

Angular Keyboard

Keyboard behavior for AngularJS Webapps.

(But the directives also respond to touch & mouse events)

Goals

  • Bring desktop-class keyboard navigation to webapps.
  • Add behavior without adding styling or new scopes.
  • No additional plugins required. (jQuery is optional)

Demos

Installation

bower

Then add a <script> to your index.html:

And add the 'keyboard' module as dependancy.

Directives

kbList

A kb-item in a kb-list can selected using the arrow keys and by clicking on the kb-item.

Example

Example styling

kbSelect

A kb-item in a kb-select can activated using the arrow keys but is selected (and deselected) by pressing 'space' or 'enter' keys or clicking an the kb-item.

Example

kbFocus

Setting or reading the focus via a service.

kbAutofocus

Set the autofocus attribute based on an expression.

Development

  • Install node.js
  • Install gulp: npm install -g bower gulp
  • Install dependencies: npm install in the repository directory.
  • gulp build to build
  • gulp watch for building & livereload on every change.
comments powered by Disqus
This page was last updated about 2 years ago.