-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose isHotkeyPressed without the Hook. Deprecate useIsHotkeyPressed
- Loading branch information
1 parent
94a797e
commit a17c33c
Showing
2 changed files
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import { useIsHotkeyPressed } from './useIsHotkeyPressed'; | ||
import { useHotkeys, Options } from './useHotkeys'; | ||
import hotkeys from 'hotkeys-js'; | ||
|
||
export { useHotkeys, useIsHotkeyPressed, Options }; | ||
const isHotkeyPressed = hotkeys.isPressed; | ||
|
||
export { useHotkeys, useIsHotkeyPressed, isHotkeyPressed, Options }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import hotkeys from 'hotkeys-js'; | ||
|
||
/** | ||
* @deprecated Use isHotkeyPressed instead. Will be removed version 4. | ||
*/ | ||
export function useIsHotkeyPressed() { | ||
return hotkeys.isPressed; | ||
} |