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

input-sim

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

input-sim

Simulate keyboard events and selection ranges for inputs

  • 2.0.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Input-Sim

This simulates a HTMLInputElement (type text) in memory. This allows you to run events, key combinations, or methods on it to affect the input's value and selected range.

Usage

Keys

InputSim.KEYS

Is a Constant that provides some keyCode mappings and methods.

InputSim.KEYS.isDigit(keyCode); // Boolean
InputSim.KEYS.isDirectional(keyCode); // Boolean

Input

InputSim.Input

This is the class you can use to create your input instances from.

var input = new InputSim.Input('Mos Eisley');

There are many methods available to control and modify this input.

input.deleteWordForward(); // input.text() -> 'Mos '

Please see our documentation for a more in depth overview.

Pull Requests

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Any contributors to the master esnext repository must sign the Individual Contributor License Agreement (CLA). It's a short form that covers our bases and makes sure you're eligible to contribute.

When you have a change you'd like to see in the master repository, send a pull request. Before we merge your request, we'll make sure you're in the list of people who have signed a CLA.

Keywords

FAQs

Package last updated on 04 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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