1.4.3 • Published 2 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
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