mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-18 06:24:25 +01:00
implement parseTextNote
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// const commands = ['openPostForm'] as const;
|
||||
// type Commands = (typeof commands)[number];
|
||||
|
||||
import { createMemo, createEffect } from 'solid-js';
|
||||
import { onMount, type JSX } from 'solid-js';
|
||||
|
||||
type Shortcut = { key: string; command: string };
|
||||
|
||||
@@ -39,7 +39,7 @@ const createShortcutsMap = (shortcuts: Shortcut[]) => {
|
||||
const useShortcutKeys = ({ shortcuts = defaultShortcut, onShortcut }: UseShortcutKeysProps) => {
|
||||
const shortcutsMap = createShortcutsMap(shortcuts);
|
||||
|
||||
createEffect(() => {
|
||||
onMount(() => {
|
||||
const handleKeydown: JSX.EventHandler<Window, KeyboardEvent> = (ev) => {
|
||||
console.log(ev);
|
||||
if (ev.type !== 'keydown') return;
|
||||
|
||||
Reference in New Issue
Block a user