const useShortcuts = () => {
  const keydownListener = React.useCallback((keydownEvent) => {
    if (keydownEvent.altKey && keydownEvent.key == "g") {
      const elem = document.getElementById("pdf-mode");
      elem.classList.toggle("hidden");
    }
  }, []);

  React.useEffect(() => {
    window.addEventListener("keydown", keydownListener, true);
    return () => window.removeEventListener("keydown", keydownListener, true);
  }, [keydownListener]);
};
