~hristoast/mousikofidi

30df69f08eccc4e87748cf0f6b5cea482dc48073 — Hristos N. Triantafillou 12 days ago 11cf4bc
Actually, do it for all binds
1 files changed, 8 insertions(+), 7 deletions(-)

M mousikofidi/static/js/player.js
M mousikofidi/static/js/player.js => mousikofidi/static/js/player.js +8 -7
@@ 966,6 966,14 @@ function volumeCtl(mediaType, action, val, interv) {

function FidiKeyBindsSetup() {
    document.addEventListener("keydown", function(e) {
        if (document.activeElement.nodeName == 'INPUT') {
            // The user has clicked inside of the "Save Queue" text box and may
            // want to type a playlist name into it. In any case, doing that
            // isn't possible when we're trying to apply our keyboard controls,
            // so don't do that when this is the case.
            return;
        }

        // Bypass keybings with Ctrl
        if (e.ctrlKey)
            return;


@@ 1056,13 1064,6 @@ function FidiKeyBindsSetup() {

        // Play/pause
        if (keyName === " ") {
            if (document.activeElement.nodeName == 'INPUT') {
                // The user has clicked inside of the "Save Queue" text box
                // and may want to type a playlist name with a space in it. In
                // any case, doing that isn't possible when we're trying to
                // apply our keyboard controls, so don't do that.
                return;
            }
            e.preventDefault();
            if (playArrows.length > 0) {
                var currentAction = audio.getAttribute("data-action");