Code Monkey home page Code Monkey logo

google-music-hotkeys's Introduction

Google / YouTube Music Hotkeys

Browser extension that adds keyboard control to the web version of Google / YouTube Music

Background

I wanted to control background playback of Google / YouTube Music without switching tabs. That is all :-)

Features

  • works in Firefox and Chromium-based browsers
  • keyboard-based playback control
    • toggle playback

      default: Ctrl+Shift+8, visual hint: *
      windows: Alt+Shift+8

    • previous song

      default: Ctrl+Shift+9, visual hint: (
      windows: Alt+Shift+9

    • next song:

      default: Ctrl+Shift+0, visual hint: )
      windows: Alt+Shift+0

  • option to customize default shortcuts
  • toolbar button
    • regular click toggles playback
    • context-click shows menu with other playback controls
  • open and pin Google Music if it is not open yet
  • try to build a new playlist when one hasn't been loaded yet
  • support for autoplay of bookmarks with &autoplay=true parameter

Install

Firefox Chrome / Chromium
Get the add-on

How To Customize Shortcuts

Firefox

  1. Open about:addons → Google / YouTube Music Hotkeys_ → Preferences
    • ..or just right-click the Browser Action:

      Right-click on Browser Action

  2. Customize key bindings to your liking:
    • Supported values are listed here. Changes are saved automatically.

      screenshot with old school shortcuts

    • The shortcut may be specified as one of the following media keys: MediaPlayPause, MediaPrevTrack, MediaNextTrack

      screenshot with media key

    • Keep in mind that some shortcuts can be intercepted by regular desktop apps running on your system. For example, on MS Windows Ctrl+Shift+0 is hijacked by system itself – see issue #3. If something does not work, try a different shortcut.
    • Customization works in Firefox 60 or later. If you are using an older version please see issue #1 before reporting a new bug.
    • Firefox does not provide API for setting Global shortcuts (that work when browser window is not focused) yet: Bug 1411795 - Add global keyboard shortcut support to commands API.
  3. That is all!

Chromium

Chromium-based browsers provide global UI for managing shortcuts of all extensions.

  1. Open chrome://extensions/configureCommands
  2. Customize key bindings to your liking
  3. You can optionally switch shortcut scope to Global:

    peek 2017-11-28 19-44
    Global shortcuts should work even when Chrome isn’t ‘in focus’.
    Keep in mind that Global shortcuts can interfere with regular desktop app shortcuts.

  4. That is all!

Development

npm install
npm run build
npm run firefox

License

Play_music_triangle.png from https://commons.wikimedia.org/wiki/File:Play_music_triangle.svg

webextensions-lib-shortcut-customize-ui is licensed under MIT

The add-on itself is released under CC0: to the extent possible under law, the author has waived all copyright and related or neighboring rights to this work, effectively placing it in the public domain.

google-music-hotkeys's People

Contributors

lidel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.