Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keypad

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keypad - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

tests/TypingNumbers.coffee

32

lib/Keypad.js

@@ -132,7 +132,12 @@ // Generated by CoffeeScript 1.8.0

this["case"] = exports.Keypad.caselist[0];
this.on('push', (function(_this) {
this.on('press', (function(_this) {
return function(key) {
return _this.ProcessKey(key);
return _this.ProcessKeyPress(key);
};
})(this));
this.on('hold', (function(_this) {
return function(key) {
return _this.ProcessKeyHold(key);
};
})(this));
}

@@ -142,8 +147,25 @@

/**
Process a keyhold
@method ProcessKeyHold
@param {String} key Key character
*/
_Class.prototype.ProcessKeyHold = function(key) {
if (key == null) {
throw new Error('Please specify pressed key code');
}
if (key === 'c') {
return this.Backspace();
}
return this.InsertCharacter(key);
};
/**
Process a keypress
@method ProcessKey
@method ProcessKeyPress
@param {String} key Key character
*/
_Class.prototype.ProcessKey = function(key) {
_Class.prototype.ProcessKeyPress = function(key) {
var current_index;

@@ -240,3 +262,3 @@ if (key == null) {

}
inserted = this.GetInsertCharacter();
inserted = this.GetInsertCharacter(text);
this.text += inserted;

@@ -243,0 +265,0 @@ this.ClearKeys();

2

package.json
{
"name": "keypad",
"description": "12-key keyboard layout emulation, similar to one that is used in mobile phones",
"version": "0.3.0",
"version": "0.4.0",
"repository": "https://github.com/muchweb/keypad",

@@ -6,0 +6,0 @@ "license": "GPL-3.0+",

@@ -1,2 +0,2 @@

# Keypad [![Build Status](https://travis-ci.org/muchweb/keypad.svg)](https://travis-ci.org/muchweb/keypad) [![NPM version](https://badge.fury.io/js/keypad.svg)](http://badge.fury.io/js/keypad) ![License: GPLv3+](http://img.shields.io/badge/license-GPLv3%2B-brightgreen.svg)
# Keypad [![Build Status](https://travis-ci.org/muchweb/keypad.svg)](https://travis-ci.org/muchweb/keypad) [![NPM version](https://badge.fury.io/js/keypad.svg)](http://badge.fury.io/js/keypad) ![License: GPLv3+](http://img.shields.io/badge/license-GPLv3%2B-brightgreen.svg) [![Dependency Status](https://gemnasium.com/muchweb/keypad.svg)](https://gemnasium.com/muchweb/keypad)

@@ -3,0 +3,0 @@ 12-key keyboard layout emulation, similar to one that is used in mobile phones.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc