➷ A robust Javascript library for capturing keyboard input. It has no dependencies.

Overview

Hotkeys

CDN jsdelivr no dependencies GitHub Actions CI Coverage Status jaywcjlove/hotkeys jaywcjlove/hotkeys

HotKeys.js is an input capture library with some very special features, it is easy to pick up and use, has a reasonable footprint (~3kb) (gzipped: 1.73kb), and has no dependencies. It should not interfere with any JavaScript libraries or frameworks. Official document demo preview. More examples.

╭┈┈╮          ╭┈┈╮  ╭┈┈╮
┆  ├┈┈..┈┈┈┈┈.┆  └┈╮┆  ├┈┈..┈┈┈┈┈..┈┈.┈┈..┈┈┈┈┈.
┆     ┆┆  □  ┆┆   ┈┤┆    < ┆  -__┘┆  ┆  ┆┆__ ┈┈┤
╰┈┈┴┈┈╯╰┈┈┈┈┈╯╰┈┈┈┈╯╰┈┈┴┈┈╯╰┈┈┈┈┈╯╰┈┈┈  ┆╰┈┈┈┈┈╯
                                  ╰┈┈┈┈┈╯

Usage

You will need Node.js installed on your system.

$ npm install hotkeys-js --save
import hotkeys from 'hotkeys-js';

hotkeys('f5', function(event, handler){
  // Prevent the default refresh event under WINDOWS system
  event.preventDefault() 
  alert('you pressed F5!') 
});

Or manually download and link hotkeys.js in your HTML, It can also be downloaded via UNPKG:

CDN: UNPKG | jsDelivr | Githack | Statically | bundle.run

<script src="https://unpkg.com/hotkeys-js/dist/hotkeys.min.js"></script>
<script type="text/javascript">
hotkeys('ctrl+a,ctrl+b,r,f', function (event, handler){
  switch (handler.key) {
    case 'ctrl+a': alert('you pressed ctrl+a!');
      break;
    case 'ctrl+b': alert('you pressed ctrl+b!');
      break;
    case 'r': alert('you pressed r!');
      break;
    case 'f': alert('you pressed f!');
      break;
    default: alert(event);
  }
});
</script>

Used in React

react-hotkeys is the React component that listen to keydown and keyup keyboard events, defining and dispatching keyboard shortcuts. Detailed use method please see its documentation react-hotkeys.

react-hotkeys-hook - React hook for using keyboard shortcuts in components. Make sure that you have at least version 16.8 of react and react-dom installed, or otherwise hooks won't work for you.

Browser Support

Hotkeys.js has been tested and should work in.

Internet Explorer 6+
Safari
Firefox
Chrome

Supported Keys

HotKeys understands the following modifiers: , shift, option, , alt, ctrl, control, command, and .

The following special keys can be used for shortcuts: backspace, tab, clear, enter, return, esc, escape, space, up, down, left, right, home, end, pageup, pagedown, del, delete, f1 through f19, num_0 through num_9, num_multiply, num_add, num_enter, num_subtract, num_decimal, num_divide.

Command()
Control
Option(alt)
Shift
Caps Lock(Capital)
fn Does not support fn
↩︎ return/Enter space

Defining Shortcuts

One global method is exposed, key which defines shortcuts when called directly.

hotkeys([keys:<String>], [option:[string|object|function]], [callback:<function>])
hotkeys('f5', function(event, handler) {
  // Prevent the default refresh event under WINDOWS system
  event.preventDefault();
  alert('you pressed F5!');
});

// Returning false stops the event and prevents default browser events
// Mac OS system defines `command + r` as a refresh shortcut
hotkeys('ctrl+r, command+r', function() {
  alert('stopped reload!');
  return false;
});

// Single key
hotkeys('a', function(event,handler){
  //event.srcElement: input 
  //event.target: input
  if(event.target === "input"){
      alert('you pressed a!')
  }
  alert('you pressed a!') 
});

// Key Combination
hotkeys('ctrl+a,ctrl+b,r,f', function (event, handler){
  switch (handler.key) {
    case 'ctrl+a': alert('you pressed ctrl+a!');
      break;
    case 'ctrl+b': alert('you pressed ctrl+b!');
      break;
    case 'r': alert('you pressed r!');
      break;
    case 'f': alert('you pressed f!');
      break;
    default: alert(event);
  }
});

hotkeys('ctrl+a+s', function() {
    alert('you pressed ctrl+a+s!');
});

// Using a scope
hotkeys('*','wcj', function(event){
  console.log('do something', event);
});

option

  • scope<String>
  • element<HTMLElement>
  • keyup<Boolean>
  • keydown<Boolean>
  • splitKey<string> (default is +)
  • capture<Boolean>
hotkeys('o, enter', {
  scope: 'wcj',
  element: document.getElementById('wrapper'),
}, function(){ 
  console.log('do something else');
});

hotkeys('ctrl-+', { splitKey: '-' }, function(e) {
  console.log('you pressed ctrl and +');
});

hotkeys('+', { splitKey: '-' }, function(e){
  console.log('you pressed +');
})

keyup

key down and key up both perform callback events.

hotkeys('ctrl+a,alt+a+s', {keyup: true}, function(event, handler) {
  if (event.type === 'keydown') {
    console.log('keydown:', event.type, handler, handler.key);
  }

  if (event.type === 'keyup') {
    console.log('keyup:', event.type, handler, handler.key);
  }
});

API REFERENCE

Asterisk "*"

Modifier key judgments

hotkeys('*', function() {
  if (hotkeys.shift) {
    console.log('shift is pressed!');
  }

  if (hotkeys.ctrl) {
    console.log('ctrl is pressed!');
  }

  if (hotkeys.alt) {
    console.log('alt is pressed!');
  }

  if (hotkeys.option) {
    console.log('option is pressed!');
  }

  if (hotkeys.control) {
    console.log('control is pressed!');
  }

  if (hotkeys.cmd) {
    console.log('cmd is pressed!');
  }

  if (hotkeys.command) {
    console.log('command is pressed!');
  }
});

setScope

Use the hotkeys.setScope method to set scope. There can only be one active scope besides 'all'. By default 'all' is always active.

// Define shortcuts with a scope
hotkeys('ctrl+o, ctrl+alt+enter', 'issues', function(){
  console.log('do something');
});
hotkeys('o, enter', 'files', function(){ 
  console.log('do something else');
});

// Set the scope (only 'all' and 'issues' shortcuts will be honored)
hotkeys.setScope('issues'); // default scope is 'all'

getScope

Use the hotkeys.getScope method to get scope.

hotkeys.getScope();

deleteScope

Use the hotkeys.deleteScope method to delete a scope. This will also remove all associated hotkeys with it.

hotkeys.deleteScope('issues');

You can use second argument, if need set new scope after deleting.

hotkeys.deleteScope('issues', 'newScopeName');

unbind

Similar to defining shortcuts, they can be unbound using hotkeys.unbind.

// unbind 'a' handler
hotkeys.unbind('a');

// Unbind a hotkeys only for a single scope
// If no scope is specified it defaults to the current scope (hotkeys.getScope())
hotkeys.unbind('o, enter', 'issues');
hotkeys.unbind('o, enter', 'files');

Unbind events through functions.

function example() {
  hotkeys('a', example);
  hotkeys.unbind('a', example);

  hotkeys('a', 'issues', example);
  hotkeys.unbind('a', 'issues', example);
}

To unbind everything.

hotkeys.unbind();

isPressed

For example, hotkeys.isPressed(77) is true if the M key is currently pressed.

hotkeys('a', function() {
  console.log(hotkeys.isPressed('a')); //=> true
  console.log(hotkeys.isPressed('A')); //=> true
  console.log(hotkeys.isPressed(65)); //=> true
});

trigger

hotkeys.trigger('ctrl+o');
hotkeys.trigger('ctrl+o', 'scope2');

getPressedKeyCodes

Returns an array of key codes currently pressed.

hotkeys('command+ctrl+shift+a,f', function(){
  console.log(hotkeys.getPressedKeyCodes()); //=> [17, 65] or [70]
})

filter

By default hotkeys are not enabled for INPUT SELECT TEXTAREA elements. Hotkeys.filter to return to the true shortcut keys set to play a role, false shortcut keys set up failure.

hotkeys.filter = function(event){
  return true;
}
//How to add the filter to edit labels. <div contentEditable="true"></div>
//"contentEditable" Older browsers that do not support drops
hotkeys.filter = function(event) {
  var target = event.target || event.srcElement;
  var tagName = target.tagName;
  return !(target.isContentEditable || tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA');
}

hotkeys.filter = function(event){
  var tagName = (event.target || event.srcElement).tagName;
  hotkeys.setScope(/^(INPUT|TEXTAREA|SELECT)$/.test(tagName) ? 'input' : 'other');
  return true;
}

noConflict

Relinquish HotKeys’s control of the hotkeys variable.

var k = hotkeys.noConflict();
k('a', function() {
  console.log("do something")
});

hotkeys()
// -->Uncaught TypeError: hotkeys is not a function(anonymous function) 
// @ VM2170:2InjectedScript._evaluateOn 
// @ VM2165:883InjectedScript._evaluateAndWrap 
// @ VM2165:816InjectedScript.evaluate @ VM2165:682

Development

To develop, Install dependencies, Get the code:

$ git https://github.com/jaywcjlove/hotkeys.git
$ cd hotkeys     # Into the directory
$ npm install    # or  yarn install

To develop, run the self-reloading build:

$ npm run watch

Run Document Website Environment.

$ npm run doc

To contribute, please fork Hotkeys.js, add your patch and tests for it (in the test/ folder) and submit a pull request.

$ npm run test
$ npm run test:watch # Development model

Contributors

As always, thanks to our amazing contributors!

Made with github-action-contributors.

License

MIT © Kenny Wong

Comments
  • event.preventDefault() 无法屏蔽窗体原生的热键?

    event.preventDefault() 无法屏蔽窗体原生的热键?

    hotkeys('ctrl+e,ctrl+b,alt+space,f', function (event, handler) {
        event.preventDefault();
        switch (handler.key) {
            case "ctrl+e":
                console.log("pressed ctrl+e");
                insertAtCursor(text, "<center></center>");
                break;
            case "ctrl+b":
                insertAtCursor(text, "<strong></strong>");
                break;
            case "alt+space":
                insertAtCursor(text, "&nbsp;&nbsp;&nbsp;&nbsp;");
                break;
            case "f":
                console.log("f");
                break;
    
    })
    

    我是这样用的,如果执行了alt+space后就无法再次使用快捷键,之前被屏蔽掉的原生的触发事件也会再次出现,版本是3.6.4

    opened by konwww 13
  • Numpad keys not detected

    Numpad keys not detected

    Numpad keys are not detected with normal handlers (they can be detected under the '*' handler, but not under a regular handler)

    Demo: https://jsfiddle.net/fk1o32a9/7/

    Actual: Using Digit1, event is detected for both events (both 1 and *) Using Numpad1, event is detected only for "*" event

    Expected: Using Digit1, event is detected for both events (both 1 and *) Using Numpad1, event is detected for both events (both 1 and *)

    bug 
    opened by swd120 12
  • bug: caps_lock

    bug: caps_lock

    https://stackoverflow.com/questions/39016292/keydown-event-is-not-fired-for-capslock-in-mac Chrome treats the CAPS ON as keydown because it treats the on/off as press and hold

    opened by yyjjqq94 11
  • Is there a way to programatically trigger a keybind?

    Is there a way to programatically trigger a keybind?

    @jaywcjlove great work with this library! :heart:

    I'm building an app where I have some keybinds (let's say hotkeys("ctrl+shift+s")) But I also have a button that allows me to do the same thing as this keybind. (Example below)

    Let's say I have a "fileA" with this code:

    export function doSomething(){
      console.log("This function really does something");
    }
    

    Then on fileB I have:

    import { doSomething } from "fileA";
    
    function App(){
      hotkeys("ctrl+shift+s", doSomething)
    }
    

    And on fileC:

    import { doSomething } from "fileA";
    
    <button onClick={doSomething}>Click me</button>
    

    Instead of importing the final function in 2 places, I would prefer the to trigger the keybind on the button click;

    fileC would look like this:

    function triggerDoSomething(){
      hotkeys.trigger("ctrl+shift+s");
    }
    <button onClick={triggerDoSomething}>Click me</button>
    
    opened by manuelnogueiramov 8
  • [BUG]All Hotkeys not work sometimes

    [BUG]All Hotkeys not work sometimes

    If we press F6 in Chrome and click on the page again, all shortcuts will not work.

    如果页面按动了一些浏览器内置的快捷键例如F6使页面失去焦点后,就算再次点击页面所有的快捷键也依然不会生效,不知为何原因但挺影响体验的。

    求助:(

    opened by Minoyu 7
  • 不知道能否实现类似于jQuery里namespace的概念,这样方便取消属于同一namespace的事件

    不知道能否实现类似于jQuery里namespace的概念,这样方便取消属于同一namespace的事件

    比如:

    $(document).on('click.ns', () => {});
    $(document).on('click.ns', () => {});
    

    这样只要:

    $(document).off('.ns')
    

    即可解绑所有ns命名空间下的事件

    感觉现在的unbind方法局限还是比较大,只能按key来解绑,而一旦解绑,是所有key对应的事件都会被解绑。有时候同一个key需要绑定多个事件,但是解绑的时候又只想解绑其中的一部分,这时候提供namespace可能会比较合适

    opened by qinyang912 7
  • 同一键,绑定不同function,如何只触发一次?

    同一键,绑定不同function,如何只触发一次?

    比如,我在公共js定义了esc function。 如果有个别页面已定义了esc,并且触发时返回false,则不再触发公共的esc function。

    hotkeys('esc', function(event,handler){ $("<div>esc-fun1</div>").appendTo(document.body); return false; }); hotkeys('esc', function(event,handler){ $("<div>esc-fun2</div>").appendTo(document.body); return false; });

    目前两个都会触发,我只想做得第一个返回false时,不再触发第二个,可以做到吗?

    opened by chenjf2k 7
  • Make Keyhandler hotkeysEvent parameter optional

    Make Keyhandler hotkeysEvent parameter optional

    From the docs I take that actually both of the arguments passed to the handler are optional, but to get this library to work properly with other libraries/applications written in TypeScript it would be preferable to actually make this second event parameter optional.

    Please close at will if I'm wrong!

    opened by julianrubisch 6
  • chore(deps): update dependency uglify-js to v3.13.6 - autoclosed

    chore(deps): update dependency uglify-js to v3.13.6 - autoclosed

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | uglify-js | 3.8.1 -> 3.13.6 | age | adoption | passing | confidence |


    Release Notes

    mishoo/UglifyJS

    v3.13.6

    Compare Source

    Features
    Bug Fixes

    v3.13.5

    Compare Source

    Features
    • drop unused self-referencing class & function (bddb5a0)
    • handle Map, Set, WeakMap & WeakSet (f46209b)
    • improve detection of unused assignment (9b8deff)
    • improve compression on variable reassignment (10dd9d4)
    • enable ESTree translation on all supported ECMAScript features (324587f, 97bd56b)
    • support __PURE__ in ESTree translation (d576495)
    Bug Fixes

    v3.13.4

    Compare Source

    Features
    • improve compression on class definition (aed758e)
    • mangle class field and method (10fbf8e)
    Bug Fixes

    v3.13.3

    Compare Source

    Features
    Bug Fixes

    v3.13.2

    Compare Source

    Features
    • support exponentiation assignment operator (01aa078)
    • flexible handling of __PURE__ through new annotations option (3b5d501)
    • retain class names via keep_fnames (997d09b)
    • better formatting of comments under beautify (7d595e2)
    • import/export { foo as foo }; :arrow_right: import/export { foo }; (2411132)
    • var f = async function*() { ... }; :arrow_right: async function* f() { ... } (b244b4e)
    Bug Fixes

    v3.13.1

    Compare Source

     

    v3.13.0

    Compare Source

     

    v3.12.8

    Compare Source

     

    v3.12.7

    Compare Source

     

    v3.12.6

    Compare Source

     

    v3.12.5

    Compare Source

     

    v3.12.4

    Compare Source

     

    v3.12.3

    Compare Source

     

    v3.12.2

    Compare Source

     

    v3.12.1

    Compare Source

     

    v3.12.0

    Compare Source

     

    v3.11.6

    Compare Source

     

    v3.11.5

    Compare Source

     

    v3.11.4

    Compare Source

     

    v3.11.3

    Compare Source

     

    v3.11.2

    Compare Source

     

    v3.11.1

    Compare Source

     

    v3.11.0

    Compare Source

     

    v3.10.4

    Compare Source

     

    v3.10.3

    Compare Source

     

    v3.10.2

    Compare Source

     

    v3.10.1

    Compare Source

     

    v3.10.0

    Compare Source

     

    v3.9.4

    Compare Source

     

    v3.9.3

    Compare Source

     

    v3.9.2

    Compare Source

     

    v3.9.1

    Compare Source

     

    v3.9.0

    Compare Source

     


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    ♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 5
  • chore(deps): update dependency husky to ~4.3.0 - autoclosed

    chore(deps): update dependency husky to ~4.3.0 - autoclosed

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | husky (source) | ~4.2.3 -> ~4.3.0 | age | adoption | passing | confidence |


    Release Notes

    typicode/husky

    v4.3.8

    Compare Source

    • Fix Cannot read property 'toString' of null
    • Improve error messages

    v4.3.7

    Compare Source

    v4.3.6

    Compare Source

    • Fix prepare-commit-msg on windows #​737

    v4.3.5

    Compare Source

    • Rollback and do not throw error if husky install fails

    v4.3.4

    Compare Source

    • Throw error if husky install fails
    • Add workaround for npm 7 currently missing INIT_CWD environment variable

    v4.3.3

    Compare Source

    v4.3.2

    Compare Source

    v4.3.1

    Compare Source

    v4.3.0

    Compare Source

    • Add .cjs config file support #​754

    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 5
  • isPressed('ctrl') only works at least one 'ctrl' listener

    isPressed('ctrl') only works at least one 'ctrl' listener

    If there's no ctrl listener, this always return false even I pressed ctrl:

    this.debugTimer = setInterval(() => {
      console.log(hotkeys.isPressed('ctrl'));    // Always false
    }, 300);
    

    However when I just add this dummy listener, now it works.

    this.debugTimer = setInterval(() => {
      console.log(hotkeys.isPressed('ctrl'));
    }, 300);
    
    hotkeys('ctrl', () => {});
    

    However I tried with command key, not works regardless there's a listener or not. Possibly it's bug.

    Tested with [email protected], [email protected].

    opened by rico345100 4
  • build(deps): bump json5 from 1.0.1 to 1.0.2

    build(deps): bump json5 from 1.0.1 to 1.0.2

    Bumps json5 from 1.0.1 to 1.0.2.

    Release notes

    Sourced from json5's releases.

    v1.0.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295). This has been backported to v1. (#298)
    Changelog

    Sourced from json5's changelog.

    Unreleased [code, diff]

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): update dependency lint-staged to ~13.1.0

    chore(deps): update dependency lint-staged to ~13.1.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | lint-staged | ~13.0.3 -> ~13.1.0 | age | adoption | passing | confidence |


    Release Notes

    okonet/lint-staged

    v13.1.0

    Compare Source

    Features

    v13.0.4

    Compare Source

    Bug Fixes
    • deps: update all dependencies (336f3b5)
    • deps: update all dependencies (ec995e5)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    build(deps): bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump async from 2.6.3 to 2.6.4

    build(deps): bump async from 2.6.3 to 2.6.4

    Bumps async from 2.6.3 to 2.6.4.

    Changelog

    Sourced from async's changelog.

    v2.6.4

    • Fix potential prototype pollution exploit (#1828)
    Commits
    Maintainer changes

    This version was pushed to npm by hargasinski, a new releaser for async since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump minimatch and recursive-readdir

    build(deps): bump minimatch and recursive-readdir

    Bumps minimatch and recursive-readdir. These dependencies needed to be updated together. Updates minimatch from 3.0.4 to 3.1.2

    Commits

    Updates recursive-readdir from 2.2.2 to 2.2.3

    Changelog

    Sourced from recursive-readdir's changelog.

    v2.2.3 - Mon, 19 Sep 2016 21:55:22 GMT

    v2.1.0 - Mon, 19 Sep 2016 21:55:22 GMT

    v2.0.0 - Wed, 06 Apr 2016 04:31:02 GMT

    v1.3.0 - Wed, 14 Oct 2015 14:35:55 GMT

    v1.2.1 - Wed, 14 Jan 2015 16:49:55 GMT

    Commits
    Maintainer changes

    This version was pushed to npm by bnb, a new releaser for recursive-readdir since your current version.


    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump loader-utils from 2.0.2 to 2.0.4

    build(deps): bump loader-utils from 2.0.2 to 2.0.4

    Bumps loader-utils from 2.0.2 to 2.0.4.

    Release notes

    Sourced from loader-utils's releases.

    v2.0.4

    2.0.4 (2022-11-11)

    Bug Fixes

    v2.0.3

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Changelog

    Sourced from loader-utils's changelog.

    2.0.4 (2022-11-11)

    Bug Fixes

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v3.10.1)
  • v3.10.1(Nov 23, 2022)

    npm bundle size npm version

    Documentation v3.10.1: https://raw.githack.com/jaywcjlove/hotkeys/673708f/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.10.0...v3.10.1

    npm i [email protected]
    
    • 🐞 fix: fix trigger isn't work well in duplicate shortcut #403 (#406) c9f693b @Yukiniro
    Source code(tar.gz)
    Source code(zip)
  • v3.10.0(Sep 7, 2022)

    npm bundle size npm version

    Documentation v3.10.0: https://raw.githack.com/jaywcjlove/hotkeys/9a19139/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.9.5...v3.10.0

    npm i [email protected]
    
    • 🌟 feat: implement getPressedKeyString for #360, #377 (#394) 5f108c5 @murugaratham
    • 💄 chore: update workflows config. 5a06998
    Source code(tar.gz)
    Source code(zip)
  • v3.9.5(Aug 20, 2022)

    npm bundle size npm version

    Documentation v3.9.5: https://raw.githack.com/jaywcjlove/hotkeys/d6faa80/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.9.4...v3.9.5

    npm i [email protected]
    
    • 💄 chore: add some special symbols (#384) 294093d @MrKou47
    Source code(tar.gz)
    Source code(zip)
  • v3.9.4(May 20, 2022)

    npm bundle size npm version

    Documentation v3.9.4: https://raw.githack.com/jaywcjlove/hotkeys/b095699/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.9.3...v3.9.4

    npm i [email protected]
    
    • 🐞 fix: Make it so unbind('') does not remove all event handlers (#372) 4aab68f @srmagura
    Source code(tar.gz)
    Source code(zip)
  • v3.9.3(May 2, 2022)

    npm bundle size npm version

    Documentation v3.9.3: https://raw.githack.com/jaywcjlove/hotkeys/cc1d948/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.9.2...v3.9.3

    npm i [email protected]
    
    • 🌟 feat: add capture option (#368) 56af32d @suhodolskiy
    Source code(tar.gz)
    Source code(zip)
  • v3.9.2(May 1, 2022)

    npm bundle size npm version

    Documentation v3.9.2: https://raw.githack.com/jaywcjlove/hotkeys/41bdb08/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.9.1...v3.9.2

    npm i [email protected]
    
    • 🌟 feat: export hotkeys interface (#366) 791cc61 @suhodolskiy
    Source code(tar.gz)
    Source code(zip)
  • v3.9.1(Apr 30, 2022)

    npm bundle size npm version

    Documentation v3.9.1: https://raw.githack.com/jaywcjlove/hotkeys/6ee1029/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.9.0...v3.9.1

    npm i [email protected]
    
    • 🆎 type: Fix index.d.ts deleteScope declaration, fix README deleteScope (#362) 0dc845b @vkruglikov
    Source code(tar.gz)
    Source code(zip)
  • v3.9.0(Apr 21, 2022)

    npm bundle size npm version

    Documentation v3.9.0: https://raw.githack.com/jaywcjlove/hotkeys/25b2d85/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.8.9...v3.9.0

    npm i [email protected]
    
    • 🌟 feat: add trigger method (#354). 2f32c2f
    • 🌟 feat: exports keyMap/modifier/modifierMap object. 6cd3f6d
    • 🆎 type: update type (#354). e404a0d
    Source code(tar.gz)
    Source code(zip)
  • v3.8.9(Apr 11, 2022)

    npm bundle size npm version

    Documentation v3.8.9: https://raw.githack.com/jaywcjlove/hotkeys/3a83b9c/index.html
    Comparing Changes: https://github.com/jaywcjlove/hotkeys/compare/v3.8.8...v3.8.9

    npm i [email protected]
    
    • 🌍 website: support dark theme. da7babf
    • 💊 clean(deps): remove dependencies. 8805f45
    • 💄 chore: update workflows config. a66cd02
    • 🌍 website: update website style. 0363302
    • 🐞 fix: Fixed an error when executing the command "npm run watch" (#351) 411006e @zhaokun1219
    • 💄 chore: Modify rollup config. (#351) 9d3cf81
    • 🐞 fix: Fix problem with element scope (#352) 973e607 @zhaokun1219
    Source code(tar.gz)
    Source code(zip)
  • v3.8.8(Apr 8, 2022)

    npm bundle size npm version

    npm i [email protected]
    

    https://github.com/jaywcjlove/hotkeys/compare/v3.8.7...v3.8.8

    • 🐞 fix: Fix the bug that the window will bind multiple focus events when hotkeys is called multiple times by different element option (#347) 9145770 @zhaokun1219
    • 🐞 fix: Remove handlers (rather than setting to {}) in eachUnbind (#345) 1b34ff3 @mwoenker
    • 📖 doc: Update README to include number pad special keys. (#329) b842dc3 @ercgrat
    • 📖 doc: Update README.md b9bca9d
    • 📖 doc: Fixed filter case error in README.md (#342) 7a3c36d @StringKe
    • 📖 doc: Update README-zh.md (#343) c4b5eab @Yukiniro
    • 📖 doc: Update badges in README.md. f15ee1a
    • 📖 doc: Update README.md 3c3a2ad
    Source code(tar.gz)
    Source code(zip)
  • v3.8.7(Jun 12, 2021)

  • v3.8.6(Jun 10, 2021)

    npm bundle size npm version

    npm i [email protected]
    

    https://github.com/jaywcjlove/hotkeys/compare/v3.8.5...v3.8.6

    • 📖 doc: update README.md 250631d
    • 🆎 type: fix eslint warnings. 45d4f54
    • 💄 chore: update workflows config. 458aa2a
    • 💄 chore(deps): update devDependencies. 5b9680c
    Source code(tar.gz)
    Source code(zip)
  • v3.8.5(May 11, 2021)

  • v3.8.4(May 11, 2021)

  • v3.8.3(Mar 11, 2021)

    • chore(deps): update dependency rollup to v2.41.0 #194 f25458e
    • chore(deps): update dependency kkt to v6.7.2 df587d4
    • feat: Add numpad special keys #254 @mmamedel 6261dbd
    Source code(tar.gz)
    Source code(zip)
  • v3.8.2(Jan 19, 2021)

    https://github.com/jaywcjlove/hotkeys/compare/v3.8.0...v3.8.2

    • 🐞 fix: Ignore keypressed in select elements that support keyboard data input. #193 0bfabfa
    • 📄 build(deps): bump lodash from 4.17.15 to 4.17.19 bf9270b
    • 📄 build(deps): bump elliptic from 6.5.2 to 6.5.3 c161980
    • 💄 chore(deps): update kkt monorepo to v5.9.0 1b42c46
    • 📄 Update LICENSE f0746cd @phodal
    • 💄 chore(deps): update kkt monorepo to v5.10.3 e6ac5c9
    • 💄 chore(deps): update dependency @uiw/react-github-corners to v1.2.0 d7a1554 @renovate-bot
    • 💄 chore(deps): update dependency @uiw/react-markdown-preview to v1.0.9 85c6c65 @renovate-bot
    • 💄 chore(deps): update dependency @uiw/reset.css to v1.0.4 627dab1 @renovate-bot
    • 📄 Update FUNDING.yml c0a190c
    • 📄 unbind all docs 7a4662e @cupcakearmy
    • 🐞 fix: 修复 unbind 解绑所有类型错误 9334891 @xjh22222228
    • 💄 chore: update ci.yml 5e76f4e
    • 💄 chore: update ci.yml 7eea8d3
    Source code(tar.gz)
    Source code(zip)
  • v3.8.0(May 17, 2020)

    • 🐞fix: Command key kept pressed fix : @dudarmykola - fdcc2d3
    • 💄chore: Fix ESLint errors. - 77018ee
    • 💄chore: parcel to kkt tools. - c0361d2
    • 💄chore: Modify watch script. - 7bad584
    • 📖doc: Update document. - c04cf0c
    Source code(tar.gz)
    Source code(zip)
  • v3.7.6(Mar 27, 2020)

    • 🐞 fix: Do not transpile typeof helper with itself. 5831035
    • 🐞 fix: Allow boolean return value from KeyHandler (#164) @jameschao d3c0d48
    • 💄 chore: Fix ESLint errors. bcb3f69
    Source code(tar.gz)
    Source code(zip)
  • v3.7.5(Mar 26, 2020)

  • v3.7.4(Mar 24, 2020)

    • 🐞 fix: More browser support. #129 - 054d0bb
    • 🐞 fix: Set ctrl and alt modifiers when altgr is pressed (#129) @nikteg - 4cac856
    • 💄 chore: Add code comments. - 5d49f18
    • 💄 chore: Modify comment. - 2c4afa0
    • 💄 chore: Modify workflows config. - 46ece3d
    • 💄 chore: Greatly improve responsiveness of the virtual keyboard on the website (#123) : @vitormv - c6634a8
    • 💄 chore: use cross-env to set environment variables in scripts (#121) : @jennings - f362846
    • 💄 chore: Otimize the document website code. - 6bfb8ec
    • 💄 chore: Modify workflows config. - 346a0c7
    • 💄 chore: Add github workflows config. - 471b549
    Source code(tar.gz)
    Source code(zip)
  • v3.7.3(Nov 22, 2019)

    • 🐞 fix: Change filter to accept a KeyboardEvent (#118) : @sk- 08fbd1c
    • 🐞 fix: Allow events in read only TextArea (#119) : @sk- 08368e0
    • 📖 doc: Fixing a typo and a spelling mistake on the comments of README.md (#110) : @smar152 a76a101
    • 💄 chore: Modify workflows config. 346a0c7
    • 💄 chore: Modify workflows config. fe8f4ff
    • 💄 chore: Add github workflows config. 471b549
    • 💄 chore: Update devDependencies. 2eff0b7
    • 💄 chore: Bump husky from 1.3.1 to 3.0.5 : 7789650
    Source code(tar.gz)
    Source code(zip)
  • v3.7.2(Sep 17, 2019)

  • v3.7.1(Aug 23, 2019)

  • v3.7.0(Aug 23, 2019)

    • 🌟 feat: custom splitkey (#105) @yyjjqq94 2616b67
    • ⛑ test: Increase code test coverage. 44283e7
    • 💄 chore: Optimization code. 6c8931a
    • 💄 chore: Indent using two spaces. #103 753f581
    • 📖 Update README.md to reflect option.splitKey (#106) : @madfriend 4d9bd78
    • 📖 Add some more detail to the README (#103) : @yakov116 2119e8a
    • 📖 Modify website keyboard styles. 8baca96
    • 🐞 Fix right command does not fires on macOS #92. 30d2160
    • 📖 Add gitee.com badges. d88b1b0
    Source code(tar.gz)
    Source code(zip)
  • v3.6.13(Jul 30, 2019)

  • v3.6.12(Jul 14, 2019)

  • v3.6.11(May 27, 2019)

  • v3.6.10(May 19, 2019)

  • v3.6.9(May 18, 2019)

  • v3.6.8(May 9, 2019)

Owner
小弟调调™
(͡·̮̃·̃) 如今撸码,像是早上起来需要刷牙一样的习惯。
小弟调调™
A robust form library for Lit that enriches input components with easy-to-use data validation features.

EliteForms A robust form library for Lit that enriches input components with easy-to-use data validation features. Installation npm install elite-form

OSLabs Beta 33 Jun 28, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A Bootstrap plugin to create input spinner elements for number input

bootstrap-input-spinner A Bootstrap / jQuery plugin to create input spinner elements for number input. Demo page with examples Examples with floating-

Stefan Haack 220 Nov 7, 2022
A phone input component that uses intl-tel-input for Laravel Filament

Filament Phone Input This package provides a phone input component for Laravel Filament. It uses International Telephone Input to provide a dropdown o

Yusuf Kaya 24 Nov 29, 2022
Fast & Robust Front-End Micro-framework based on modern standards

Chat on gitter Hello slim.js - your declarative web components library import { Slim } from 'slim-js'; import { tag, template } from 'slim-js/decorato

slim.js 942 Dec 30, 2022
Fast and robust triangle-triangle intersection test with high precision for cross and coplanar triangles based on the algorithm by Devillers & Guigue.

fast-triangle-triangle-intersection Fast and robust triangle-triangle intersection test with high precision for cross and coplanar triangles based on

Technology and knowledge for interaction 10 Nov 15, 2022
Robust, plug & play generator for Bootstrap toasts.

Bootstrap Toaster Robust, plug & play generator for Bootstrap toasts. Supports Bootstrap 4 and Bootstrap 5. Demo A demo page is available at bootstrap

Peyton Gasink 22 Dec 21, 2022
A robust, minimal-server-interaction API for peer routing in the browser

Robust, minimal-server-interaction peer routing in the browser What is this? Membrane takes signalling to the browser, creating living peer networks.

Elijah Bodden 13 Jan 6, 2023
A robust and light-weight inventory management application designed to help businesses maintain perfect control over every unit of stock.

Inventory Buddy Access inventory anytime on web, tablet or mobile. Inventory Buddy is a robust and light-weight inventory management application desig

Brynn Smith 7 Nov 5, 2022
A simple library for handling keyboard shortcuts with Alpine.js.

✨ Help support the maintenance of this package by sponsoring me. Alpine.js Mousetrap A simple library for handling keyboard shortcuts with Alpine.js.

Dan Harrin 102 Nov 14, 2022
A Deno library for interacting with the mouse 🖱️ keyboard ⌨️ and screen 💻

A Deno library for interacting with the mouse ??️ keyboard ⌨️ and screen ?? . Litebot provides a simple API for creating kbm events, macros, & working with displays. Litebot leverages Deno's FFI to allow speedy low level control in C & C++ while having a typescript API exposed to the user.

Tyler Laceby 10 Aug 30, 2022
Keyboard shortcut handler. KISS, light and library free.

Shortcut.js Shortcut.js is a JavaScript ES6 component that offers a global keyboard event handler. This way one can declare and react to any combinati

Arthur Beaulieu 4 Sep 28, 2022
Fancytree - JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading

Fancytree Fancytree (sequel of DynaTree 1.x) is a JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkb

Martin Wendt 2.6k Jan 9, 2023
Canvas-based JavaScript UI element implementing touch, keyboard, mouse and scroll wheel support.

pure-knob Initially a (circular) knob / dial control with mouse, wheel, touch and keyboard support, implemented in pure JavaScript. In addition, this

Andre Plötze 44 Nov 4, 2022
An exact, client-side mechanical keyboard plate generator

ai03 Plate Generator v2 Yet another mechanical keyboard plate generator. Try it live Available here Features A focus on exceptionally accurate plate g

ai03 34 Jan 3, 2023
Fix your mistake when you forget to change your keyboard language!

Persian Typo Mistake ???? Introduction With this extension, you can fix your text that is written in Persian but on an English keyboard. this extensio

Hadi Zare 27 Nov 23, 2022
⌨️ Visualize keyboard history for osu! in bar form

bar-overlay-for-osu Visualize keyboard history for osu! Example Vertical Horizontal Features Customizable: keys, colors, speed, spacing, etc. Receives

solstice23 6 Oct 27, 2022