fix: Editor shortcut conflicts (#2943)

* fix: ctrl+n shortcut conflicts

* Update kbar with fix for ctrl-k on macOS
This commit is contained in:
Tom Moor
2022-01-15 17:47:53 -08:00
committed by GitHub
parent 49718f2894
commit 5abc73fabc
4 changed files with 37 additions and 18 deletions

View File

@@ -1,8 +1,9 @@
import useKeyDown, { KeyFilter } from "~/hooks/useKeyDown";
import useKeyDown, { KeyFilter, Options } from "~/hooks/useKeyDown";
type Props = {
trigger: KeyFilter;
handler: (event: KeyboardEvent) => void;
options?: Options;
};
/**
@@ -10,7 +11,7 @@ type Props = {
* class components that have not yet been converted to functions. Do not use
* this method in functional components.
*/
export default function RegisterKeyDown({ trigger, handler }: Props) {
useKeyDown(trigger, handler);
export default function RegisterKeyDown({ trigger, handler, options }: Props) {
useKeyDown(trigger, handler, options);
return null;
}