"use client"

import { useEffect } from "react"

export function useHandleKeyUp(callback: (event: KeyboardEvent) => void) {
  useEffect(() => {
    window.addEventListener("keyup", callback)
    return () => {
      window.removeEventListener("keyup", callback)
    }
  }, [callback])
}
