w3c-keyname

WebJar for w3c-keyname

License

License

MIT
Categories

Categories

KeY Data Data Formats Formal Verification
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

w3c-keyname
Last Version

Last Version

2.2.4
Release Date

Release Date

Type

Type

jar
Description

Description

w3c-keyname
WebJar for w3c-keyname
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/marijnh/w3c-keyname

Download w3c-keyname

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/w3c-keyname/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>w3c-keyname</artifactId>
    <version>2.2.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/w3c-keyname/
implementation 'org.webjars.npm:w3c-keyname:2.2.4'
// https://jarcasting.com/artifacts/org.webjars.npm/w3c-keyname/
implementation ("org.webjars.npm:w3c-keyname:2.2.4")
'org.webjars.npm:w3c-keyname:jar:2.2.4'
<dependency org="org.webjars.npm" name="w3c-keyname" rev="2.2.4">
  <artifact name="w3c-keyname" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='w3c-keyname', version='2.2.4')
)
libraryDependencies += "org.webjars.npm" % "w3c-keyname" % "2.2.4"
[org.webjars.npm/w3c-keyname "2.2.4"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

W3C keyname

Tiny library that exports a function keyName that takes a keyboard event and returns a KeyboardEvent.key-style string. Will use the actual key property of the event if available, and fall back to a value synthesized from the keyCode otherwise.

Probably often wrong on non-US keyboards, since the correspondence between a key code and the character it produces when shift is held is predicted based on a hard-coded table. Meant as a fallback for KeyboardEvent.key, not a replacement.

The lookup tables from key codes (event.keyCode) to names are exported as base (when Shift isn't held) and shift (when Shift is held).

License: MIT

Versions

Version
2.2.4
2.2.2
1.1.8