Skip to content

Commit 5f2e471

Browse files
committed
Register keyboard shortcut correctly
1 parent 9d3f11f commit 5f2e471

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ const KeyboardShortcuts = {
174174
VOLUME_DOWN: 'arrowdown',
175175
STATS: 'd',
176176
TAKE_SCREENSHOT: 'u',
177+
UNSKIP_SPONSOR_BLOCK: 'enter',
177178
},
178179
PLAYBACK: {
179180
PLAY: 'k',

src/renderer/components/FtKeyboardShortcutPrompt/FtKeyboardShortcutPrompt.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const localizedShortcutNameToShortcutsMappings = computed(() => {
144144
[t('KeyboardShortcutPrompt.Volume Down'), ['VOLUME_DOWN']],
145145
[t('KeyboardShortcutPrompt.Take Screenshot'), ['TAKE_SCREENSHOT']],
146146
[t('KeyboardShortcutPrompt.Stats'), ['STATS']],
147+
[t('KeyboardShortcutPrompt.Unskip Sponsor Block'), ['UNSKIP_SPONSOR_BLOCK']],
147148
148149
[t('KeyboardShortcutPrompt.Play'), ['PLAY']],
149150
[t('KeyboardShortcutPrompt.Large Rewind'), ['LARGE_REWIND']],

src/renderer/components/ft-shaka-video-player/ft-shaka-video-player.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2305,7 +2305,7 @@ export default defineComponent({
23052305
}
23062306

23072307
switch (event.key.toLowerCase()) {
2308-
case 'enter': {
2308+
case KeyboardShortcuts.VIDEO_PLAYER.GENERAL.UNSKIP_SPONSOR_BLOCK: {
23092309
if (skippedSponsorBlockSegments.value.length > 0) {
23102310
event.preventDefault()
23112311
const segment = skippedSponsorBlockSegments.value[skippedSponsorBlockSegments.value.length - 1]

static/locales/en-US.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,3 +1211,4 @@ KeyboardShortcutPrompt:
12111211
End: Seek to the end of the video
12121212
Skip to Next Video: Skip to the next video in a playlist or next recommended video
12131213
Skip to Previous Video: Skip to the previous video in a playlist
1214+
Unskip Sponsor Block: Unskip sponsor block segment

0 commit comments

Comments
 (0)