Skip to content
Discussion options

You must be logged in to vote

The prebuilt pake-youtube binary has no settings panel for extra keys. You add them by injecting JS and rebuilding.

Save something like yt-keys.js:

document.addEventListener('keydown', (e) => {
  if (['INPUT', 'TEXTAREA'].includes(e.target.tagName) || e.target.isContentEditable) return;
  const h = window.innerHeight;
  if (e.key === 'd' && !e.ctrlKey) { window.scrollBy(0, h / 2); e.preventDefault(); }
  if (e.key === 'u' && !e.ctrlKey) { window.scrollBy(0, -h / 2); e.preventDefault(); }
  if (e.key === 'g' && !e.shiftKey) { window.scrollTo(0, 0); e.preventDefault(); }
  if (e.key === 'G') { window.scrollTo(0, document.documentElement.scrollHeight); e.preventDefault(); }
}, true);

YouTube…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Yaman-Harfoush
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants