This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Flag to check if shift key is pressed | |
let vcr_shiftPressed = false; | |
// Listen for keydown events on the window | |
// Flag to check if Command (on MacOS) or Ctrl (on other OS) + 'J' is pressed | |
let vcr_commandOrCtrlPressed = false; | |
// Listen for keydown events on the window | |
window.addEventListener('keydown', function(event) { | |
// Check if the pressed key is 'J' and either Command (metaKey) or Ctrl is pressed |