Merge pull request #6070 from dmitrylyzo/fix-hotkeys

Make hotkeys strict and prevent default actions for handled ones
This commit is contained in:
Bill Thornton
2024-09-20 14:47:33 -04:00
committed by GitHub
5 changed files with 108 additions and 42 deletions
+3
View File
@@ -125,6 +125,9 @@ export function isInteractiveElement(element) {
export function enable() {
const hasMediaSession = 'mediaSession' in navigator;
window.addEventListener('keydown', function (e) {
// Skip modified keys
if (e.ctrlKey || e.altKey || e.metaKey || e.shiftKey) return;
const key = getKeyName(e);
// Ignore navigation keys for non-TV