Skip to content

Intercept CTRL+R to Recall Last Command #87

@misterrodg

Description

@misterrodg
  1. Override default browser behavior to allow CTRL + R to be used for "Recall Last Command"
  2. Adjust documentation, and/or UI as appropriate: Are there any reasons the user should need to refresh the page manually? If so, adjust UI to provide an alternate method, or point user to refresh icon in browser?

Example Code:

  useEffect(() => {
    const handleKeyDown = (event) => {
      // CTRL+R (Windows/Linux) or CMD+R (Mac)
      if ((event.ctrlKey || event.metaKey) && event.key === "r") {
        event.preventDefault(); // Prevents page refresh
        // Do your custom action here
      }
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions