1.4.3 • Published 2 years ago

@forter/hotkey v1.4.3

Weekly downloads
46
License
Apache-2.0
Repository
github
Last release
2 years ago

fc-hotkey

An element to simply add keyboard shortcuts to buttons and inputs :)

npm.io npm.io npm.io npm.io npm.io npm.io

Usage

<script>
   import '@forter/hotkey';
</script>

<fc-hotkey keys="ctrl+z">
   <fc-button onclick="alert('here')"> Hotkey </fc-button>
</fc-hotkey>

Examples

<!-- focus -->
<fc-hotkey keys="ctrl+z">
   <fc-input></fc-input>
</fc-hotkey>

<!-- keypress -->
<fc-hotkey onkeypress="alert('keypress hotkey');" keys="ctrl+z">
    Hotkeys without slotted
</fc-hotkey>

Properties

PropertyAttributeTypeDescription
descriptiondescriptionstringText of the shortcut for the hotkeys modal
keyskeys"ctrl+c" \| "ctrl+shift+c" \| "esc,space"key combination that will activate button click or input focus.
parentparentbooleanIndicate if parent shoulbe be clicked instead slotted

Events

Event
keypress

CSS Custom Properties

PropertyDescription
--fc-hotkey-text-colorcolor.
1.4.3

2 years ago

1.4.2

3 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.9

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago