An open API service indexing awesome lists of open source software.

https://github.com/kyle-west/power-access

Provide your users with power keyboard shortcuts
https://github.com/kyle-west/power-access

Last synced: 3 months ago
JSON representation

Provide your users with power keyboard shortcuts

Awesome Lists containing this project

README

        

# power-access

This is a native web component that allows for an accessibility layer on top of
your web application.

# Register Shortcut

```js
let registrar = new KeyboardShortcutRegistrar();
registrar.register(options, callback)
```

### Options

```js
let options = {
keyStroke: 'Control+c', // The key stroke that fires the callback
displayKeys: ' + c', // The text shown in place of keyStroke to user (if supplied)
label: 'Copy text to the clipboard' // The description shown to the user of the action
hidden: false; // [OPTIONAL] default:false, show the shortcut in the power-access menu
}
```

# Shortcut Menu

```html

...

```

# Inject HTML / Styles
> As of version 1.0.0, the `` component no longer uses ShadowDOM, so HTML injection may no longer be needed by your application.

Use the following to inject an additional stylesheet into the component:

```js
document.querySelector('power-access').injectHTML = `

`
```