Set dev mode in VS Code

I want to use the shortcut key Ctrl + R to reload the window, but I don’t know how to do so in the development state. Can you explain how to do this?

Ctrl + R

In the development state, you can use the location.reload() method to reload the current window. To bind this method to the Ctrl + R shortcut key, you can use the following code:

document.addEventListener('keydown', function(event) {
  if (event.ctrlKey && event.keyCode === 82) {
    event.preventDefault();
    location.reload();
  }
});

This code adds an event listener to the document object that listens for the keydown event. When the Ctrl + R shortcut key combination is detected (by checking if the ctrlKey property is true and the keyCode property is 82), it prevents the default behavior (which is to refresh the page) and calls the location.reload() method to reload the current window.