1.4.3 • Published 3 years ago
@forter/hotkey v1.4.3
fc-hotkey
An element to simply add keyboard shortcuts to buttons and inputs :)
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
Property | Attribute | Type | Description |
---|---|---|---|
description | description | string | Text of the shortcut for the hotkeys modal |
keys | keys | "ctrl+c" \| "ctrl+shift+c" \| "esc,space" | key combination that will activate button click or input focus. |
parent | parent | boolean | Indicate if parent shoulbe be clicked instead slotted |
Events
Event |
---|
keypress |
CSS Custom Properties
Property | Description |
---|---|
--fc-hotkey-text-color | color. |
1.4.3
3 years ago
1.4.2
5 years ago
1.4.1
5 years ago
1.4.0
5 years ago
1.3.9
5 years ago
1.3.8
5 years ago
1.3.7
5 years ago
1.3.6
5 years ago
1.3.5
5 years ago
1.3.4
5 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago