Skip to content

Commit

Permalink
Hotkeys for three buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
fkurmannucsc committed Jun 26, 2024
1 parent 2547e6b commit 0642e1d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,25 @@ function fetchVersion() {
});
}

// Initialize hotkey functionality.
function initializeHotkeys() {
document.addEventListener('keydown', (event) => {
if (event.code === 'KeyB') {
toggleSelection();
}
if (event.code === 'KeyF') {
captureFrame();
}
if (event.code === 'KeyS') {
save();
}
// Later add arrow keys for frame step in video.
});
}

function main() {
fetchVersion();
initializeHotkeys();
goToUploadScreen();
}

Expand Down

0 comments on commit 0642e1d

Please sign in to comment.