npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue2-keylogger-input

v1.0.7

Published

Keylogger input web component compatible with Vue2.

Downloads

65

Readme

Documentation

Installation via npm

npm i vue2-keylogger-input

Usage

In main.js file.

import Keylogger from "vue2-keylogger-input;
Vue.use(Keylogger);

Example component usage.

   <vue2-keylogger-input
	   v-model="model"
	   :validation="validateLength"
	   placeholder="validation sentence"
	  :disableIfCorrect="true"
   ></vue2-keylogger-input>

Where validation function called validateLength is defined as:

    validateLength(string) {
      if (!string) return null;
      if (string != null && string.length > 0 && string == 'validation sentence')
        return "valid";
      return "invalid";
    },

Option disableIfCorrect is optional and makes input disabled if correnct sentence is provided for the first time.

Keys time delays included in statistics

  • down_down_time - time between pressing two adjacent keys in time
  • up_up_time - time between releasing two adjacent keys in time
  • push - key push time ( down timestamp - up timestamp)
  • up_time - moment of key release in time (ms)
  • down_time - moment of key pushed in time (ms)
  • key_code - key code
  • key_value - key value for a specific code

Output

Output generated by passing word pwr. Output structure contains three objects:

  • current - Part of the results containing information about the current state of data entered into the keylogger, including: the current phrase that is entered when the object is generated and the message whether the phrase is positively validated by the validation function passed to the keylogger during its initialization. In addition, it returns information about unique characters and the composition of the currently entered phrase.
  • history - The part of the results containing information on the number of entered letters, the number of uniquely entered letters and the history of successively entered letters as to their value.
  • timeline - The part of the results containing the course of successively typed letters in time, supplemented with detailed statistics
{
    "timeline": [
        {
            "key_id": 1,
            "key_value": "p",
            "key_code": 80,
            "key_down_time": 1637194599020,
            "key_up_time": 1637194599097,
            "key_pushed_time": 77,
            "key_up_up_time": 202,
            "key_down_down_time": 190
        },
        {
            "key_id": 2,
            "key_value": "w",
            "key_code": 87,
            "key_down_time": 1637194599210,
            "key_up_time": 1637194599299,
            "key_pushed_time": 89,
            "key_up_up_time": 207,
            "key_down_down_time": 199
        },
        {
            "key_id": 3,
            "key_value": "r",
            "key_code": 82,
            "key_down_time": 1637194599409,
            "key_up_time": 1637194599506,
            "key_pushed_time": 97,
            "key_up_up_time": 0,
            "key_down_down_time": 0
        }
    ],
    "history": {
        "keys_history": [
            "p",
            "w",
            "r"
        ],
        "keys_number": 3,
        "unique_keys_used": [
            "p",
            "w",
            "r"
        ],
        "unique_keys_number": 3
    },
    "current": {
        "input_value": "pwr",
        "valid": true,
        "keys_used": [
            "p",
            "w",
            "r"
        ],
        "keys_number": 3,
        "unique_keys_used": [
            "p",
            "w",
            "r"
        ],
        "unique_keys_number": 3
    }
}

Features

  • Vue2 support