From: Chocobozzz Date: Fri, 20 May 2022 08:06:01 +0000 (+0200) Subject: Fix 0-9 player hotkey conflict with web browser X-Git-Tag: v4.2.0-rc.1~12 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=1c8a9a1d2288247abc3ea7199954db9421bdb7b4;p=github%2FChocobozzz%2FPeerTube.git Fix 0-9 player hotkey conflict with web browser --- diff --git a/client/src/assets/player/shared/hotkeys/peertube-hotkeys-plugin.ts b/client/src/assets/player/shared/hotkeys/peertube-hotkeys-plugin.ts index 5920450bd..8255245b5 100644 --- a/client/src/assets/player/shared/hotkeys/peertube-hotkeys-plugin.ts +++ b/client/src/assets/player/shared/hotkeys/peertube-hotkeys-plugin.ts @@ -160,7 +160,7 @@ class PeerTubeHotkeysPlugin extends Plugin { // 0-9 key handlers for (let i = 0; i < 10; i++) { handlers.push({ - accept: e => e.key === i + '', + accept: e => e.key === i + '' && !e.ctrlKey, // If using ctrl key, it's a web browser hotkey cb: e => { e.preventDefault()