Quantcast
Channel: Kodi Community Forum - All Forums
Viewing all articles
Browse latest Browse all 84006

Keyboard navigation in default webinterface

$
0
0
Hi, I have been spoiled by the simplicity of the remote application for iOS that I use almost daily on my iPhone or iPad.

But sometimes, I want to use the web interface, because I have my laptop with me and don't want to reach for my phone. These times, I always end up frustrated by the webinterface that I find harder to use by clicking on each button with my mouse.

So i created a small Javascript to enable keyboard navigation on the remote controller of the webinterface. Just run it and keyboard navigation is effective immediately: Arrow keys to navigate, Enter to validate, Backspace to return back, Space to play/pause and Escape to go home.

Here is the script:

Code:
var handlers = {
    8: "back",
    27: "home",
    13: "ok",
    32: "playpause",
    37: "left",
    38: "up",
    39: "right",
    40: "down"
};
$(document).bind("keydown", function(event){
    var handler = handlers[event.which];
    if( handler ){
        $("#" + handler).click();
        event.preventDefault();
    }
});

I hope this can help someone else and maybe end up in the code of the default webinterface :-)

Viewing all articles
Browse latest Browse all 84006

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>