{"id":13411209,"url":"https://github.com/dmauro/Keypress","last_synced_at":"2025-03-14T17:30:24.046Z","repository":{"id":4182936,"uuid":"5299931","full_name":"dmauro/Keypress","owner":"dmauro","description":"A keyboard input capturing utility in which any key can be a modifier key.","archived":false,"fork":false,"pushed_at":"2020-09-06T00:02:02.000Z","size":5749,"stargazers_count":3189,"open_issues_count":35,"forks_count":315,"subscribers_count":94,"default_branch":"development","last_synced_at":"2024-04-14T15:42:46.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://dmauro.github.io/Keypress/","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmauro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-05T00:36:37.000Z","updated_at":"2024-04-03T09:49:35.000Z","dependencies_parsed_at":"2022-08-31T04:22:52.800Z","dependency_job_id":null,"html_url":"https://github.com/dmauro/Keypress","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmauro%2FKeypress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmauro%2FKeypress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmauro%2FKeypress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmauro%2FKeypress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmauro","download_url":"https://codeload.github.com/dmauro/Keypress/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243618574,"owners_count":20320261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:12.174Z","updated_at":"2025-03-14T17:30:23.434Z","avatar_url":"https://github.com/dmauro.png","language":"CoffeeScript","readme":"Keypress\n========\nVersion 2.1.5\n\nKeypress is a robust keyboard input capturing Javascript utility\nfocused on input for games. For details and documentation, please\nvisit [http://dmauro.github.io/Keypress/](http://dmauro.github.io/Keypress/)\n\nIf you're using Keypress with Meteor, see the [Meteor notes](meteor/README.md).\n\nCopyright 2016 David Mauro  \nreleased under the Apache License, version 2.0\n\n\n**What's new**\n---------------\n\n2.1.5\n\n* Fixed a bug that would prevent unregistering meta combos by name rather than reference. Thanks to [bichotll](https://github.com/bichotll), [aubincleme](https://github.com/aubincleme), and [mhuebert](https://github.com/mhuebert) for help [spotting](https://github.com/dmauro/Keypress/issues/133) and [fixing](https://github.com/dmauro/Keypress/pull/141) the issue.\n\n2.1.4\n\n* Remove unexpected debugger\n* Backup to e.key if there is no e.keyCode. Thanks [kvantetore](https://github.com/kvantetore). [Pull request #107](https://github.com/dmauro/Keypress/pull/107)\n\n2.1.3\n\n* Just fixing the bower JSON. Thanks [OleCordsen](https://github.com/OleCordsen). [Issue #101](https://github.com/dmauro/Keypress/issues/101)\n\n2.1.2\n\n* Added some simple jQuery proofing so you can pass in the result of a jQuery selector into the Listener's constructor. Thanks to [mallocator](https://github.com/mallocator) for the request. [Issue #89](https://github.com/dmauro/Keypress/issues/89)\n* Changed the default behavior of how sequence combos behavior. Most people probably would have considered this a bug, so I'm not considering this API breaking. Thanks to [ronnyek](https://github.com/ronnyek) for pointing the problem out in [Issue #68](https://github.com/dmauro/Keypress/issues/68).\n* Bower file cleaned up thanks to [kkirsche](https://github.com/kkirsche). [Pull request #97](https://github.com/dmauro/Keypress/pull/97)\n* Keys in FF/Gecko - and = fixed thanks to [deanputney](https://github.com/deanputney). [Pull request #95](https://github.com/dmauro/Keypress/pull/95)\n\n2.1.1\n\n* Added [Meteor](https://www.meteor.com/) support. Thanks to [dandv](https://github.com/dandv). [Pull request #63](https://github.com/dmauro/Keypress/pull/63)\n\n2.1.0\n\n* Another fix for unregistering combos using an array of keys\n* Added a destroy method to cleanup a listener. Thanks to [smerickson](https://github.com/smerickson) for submitting. [Pull request #51](https://github.com/dmauro/Keypress/pull/51)\n* Fixed compatibility for '-'/'_' and '='/'+' keys in FireFox. Thanks to [simonsarris](https://github.com/simonsarris) for spotting the bug. [Issue #50](https://github.com/dmauro/Keypress/issues/50)\n* Added [spm support](http://spmjs.io/package/keypress). Thanks to [sorrycc](https://github.com/sorrycc). [Pull request #52](https://github.com/dmauro/Keypress/pull/52)\n\n2.0.3\n\n* Fixed a bug unregistering combos using arrays of keys\n* Added ie8 compatibility shim. Thanks to [barrkel](https://github.com/barrkel). [Issue #41](https://github.com/dmauro/Keypress/issues/41)\n* Fixed a bug targetting the semicolon key in Firefox. Thanks to [mikekuehn](https://github.com/mikekuehn).\n* Added commonJS module support. [Issue #45](https://github.com/dmauro/Keypress/issues/45)\n\n2.0.2\n\n* Fixed a bug that prevented combos from unregistering, and updated the docs for how to unregister properly. Thanks to [pelly](https://github.com/pelly) and [g00fy-](https://github.com/g00fy-). [Issue # 34](https://github.com/dmauro/Keypress/issues/34).\n* Added [AMD](http://requirejs.org/docs/whyamd.html) support. [Issue #37](https://github.com/dmauro/Keypress/issues/37).\n\n2.0.1\n\n* Fixed a big ole bug with meta/cmd combos. Thanks to [lexey111](https://github.com/lexey111). [Issue #29](https://github.com/dmauro/Keypress/issues/29).\n* Fixed a bug with the Windows key being released on Windows systems. [Issue #27](https://github.com/dmauro/Keypress/issues/27).\n\n2.0.0\n\n* Keypress now has a listener class that must be instantiated. The functions that were previously in the global window.keypress object are now public methods of the window.keypress.Listener class.\n* Each instance of a Keypress listener can be bound to a DOM element by passing in the element to the listener's constructor.\n* Combos now default to being ordered (the property is now called is_unordered and is false by default).\n* Combos' handlers preventDefault unless the handler returns true.\n* The \"combo\" public method is now called \"simple_combo\".\n* The basic combo helpers for simple, counting and sequence combos no longer have a third prevent_default optional parameter.\n* Debugging console logs can be enabled by setting keypress.debug to true.\n* All key event callbacks send a third argument specifying whether the event is firing again automatically because the key has remained pressed down.\n\n1.0.9\n\n* Fix escape key bug. Issue #17.\n* Fix unregister bug. Issue #24.\n\n1.0.8\n\n* Ensure that on_release is called for all combos, not just counting combos.\n* Fix bug that was causing is_ordered to be ignored.\n* Fixed an edge case for a counting combo's count not being reset.\n* Improve how key events are bound\n\n1.0.7\n\n* Fixed combo matching to prevent performance issues as more keys are pressed.\n\n1.0.6\n\n* Fixed a bug with exclusive combos not properly excluding each other in some cases.\n* Feature added to allow for combos that do not fire if unrelated keys are also pressed (\"is_solitary\" boolean).\n\n\n\nTODO\n----\n\n* Put negative edge in sequences.\n* See if we can do away with keyup_fired and count properties.\n","funding_links":[],"categories":["CoffeeScript","UI","Keyboard Wrappers","Keyboard Wrappers [🔝](#readme)","键盘封装器"],"sub_categories":["Runner","运行器","运行器e2e测试"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmauro%2FKeypress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmauro%2FKeypress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmauro%2FKeypress/lists"}