Skip to content

slaypni/hapt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Hapt

Hapt is a javascript library for listening key bindings.

Example

// load hapt.js before executing following scripts.

hapt.listen(function(keys){
  switch (keys.join(' ')) {
    case 'E':
      // do something.
      return false; // prevent event propagation.
    case 'Shift Alt A':
      // do something.
      return false;
  }
  return true;
});

About

A key bindings listener for JavaScript.

Resources

Stars

Watchers

Forks

Packages

No packages published