Skip to content

Instantly share code, notes, and snippets.

View borismus's full-sized avatar

Boris Smus borismus

View GitHub Profile
@joelcox
joelcox / gist:6641424
Last active December 23, 2015 13:19
Bind to multimedia keys

Bind to multimedia keys

Web applications are increasingly taking over the functions of native applications. This year has seen an increase of (streaming) audio web applications, such as Rdio, Spotify, Pandora, etc. These applications are long-running applications and provide multimedia to the user, often while the user is doing something else.

Interaction with this type of application works the same as with other applications: the user brings the tab/window in focus and manipulates the application through mouse, keyboard or other input device. Bringing the application into focus is required in order to interact with the application and thus requires the user to get out of the current workflow.

In native applications this problem is fixed by letting applications bind to specific multimedia buttons situated on the keyboard. These buttons serve as a way to interact with the media player without bringing the application into focus. This is currently impossible for web applications for t