• Jodanzuki

    Hello!

    I have both Unified TV and Unified Remote. I am currently trying to have a shortcuts widget using KWGT by using tasker to integrate all three apps. I can run tasks just fine for Unified TV, but nothing happens when I run tasks with Unified Remote commands. Is there any conflict between the two?

    Cheers.

    posted in Q&A read more
  • Jodanzuki

    Hello. This a remote for youtube.com/tv. It is the same app bundled with Smart TVs. The web version is very keyboard/MCE remote friendly, so I wanted to give it a try for a media remote.

    A few notes before I link the file. It was tailored for Windows, so some keystrokes might not work on other systems. The red button opens youtube.com/tv on your browser. The lower left button is for killing background annoyances (discordptb, whatsapp and music programs). The buttons above play/pause are for skipping playback.

    Enjoy!

    Here is the download link: http://www.mediafire.com/file/agce2zrg5jfd7sf/YoutubeTV.zip/file

    I will leave the code blocks below for those that do not want to download an stranger's file.

    layout.xml

    <?xml version="1.0" encoding="utf-8"?>
    <layout onVolumeUp="volume_up" onVolumeDown="volume_down">
        <row weight="3">
            <button icon="refresh" color="#647C64" ontap="refresh" />
            <button icon="up" color="#455A64" ontap="up" />
            <button icon="docclose" color="#647C64" ontap="esc" />
        </row>
        <row weight="3">
            <button icon="left" color="#455A64" ontap="left" />
            <button icon="select" color="#E65100" ontap="ok" />
            <button icon="right" color="#455A64" ontap="right" />
        </row>
        <row weight="3">
            <button icon="window" color="#c62828" ontap="yttvlaunch" />
            <button icon="down" color="#455A64" ontap="down" />
            <button icon="fullscreen" color="#647C64" ontap="fullscreen" />
        </row>
        <row weight="2">
            <grid>
                <button icon="previous" weight="1" color ="#7E735F" ontap="previous" />
                <button icon="next" weight="1" color ="#7E735F" ontap="next" />
            </grid> 
            <grid>
                <button icon="rotateleft" weight="1" color="#847545" ontap="skipback" />
                <button icon="select" weight="1" color="#847545" ontap="ok" />
                <button icon="rotateright" weight="1" color="#847545" ontap="skipforward" />
            </grid> 
        </row>
        <row weight="2">
            <button image="killem.png" scale="native" weight="1" color="#7E735F" ontap="killem" />
            <button icon="docswitch" weight="1" color="#7E735F" ontap="alttab" />
            <button icon="playpause" weight="2" color="#847545" ontap="space" />
        </row>
    </layout>
    

    remote.lua

    local kb = libs.keyboard;
    local http = libs.http;
    local script = libs.script;
    
    
    function down(i)
        for i = 1, i do
            kb.press("volumedown");
        end
    end
    
    function up(i)
        for i = 1, i do
            kb.press("volumeup");
        end
    end
    
    [email protected] Raise volume
    actions.volume_up = function ()
        up(1);
    end
    
    [email protected] Lower volume
    actions.volume_down = function ()
        down(1);
    end
    
    [email protected] F5
    actions.refresh = function ()
        kb.stroke("F5");
    end
    
    
    [email protected] VolUp
    actions.up = function ()
        kb.stroke("up");
    end
    
    
    [email protected] Esc
    actions.esc = function ()
        kb.press("esc");
            kb.up("alt");
    end
    
    
    [email protected] Left
    actions.left = function ()
        kb.stroke("left");
    end
    
    
    [email protected] OK
    actions.ok = function ()
        kb.press("enter");
            kb.up("alt");
    end
    
    
    [email protected] Right
    actions.right = function ()
        kb.stroke("right");
    end
    
    [email protected] Launch YoutubeTV
    actions.yttvlaunch = function ()
        cd = script.batch("start https://www.youtube.com/tv")
    end
    
    
    [email protected] Down
    actions.down = function ()
        kb.stroke("down");
    end
    
    [email protected] Fullscreen
    actions.fullscreen = function ()
        kb.stroke("f11");
        cd = script.batch("nircmd movecursor 3500 3500")
    end
    
    [email protected] Previous in Playlist
    actions.previous = function ()
        kb.stroke("H")
    end
    
    [email protected] Skip back 10s
    actions.skipback = function ()
        kb.stroke("J")
    end
    
    [email protected] Skip forward 10s
    actions.skipforward = function ()
        kb.press("L")
    end
    
    [email protected] Next in Playlist
    actions.next = function ()
        kb.stroke("186");
    end
    
    [email protected] Kills background annoyances.
    actions.killem = function ()
        cd = script.batch("nircmd.exe killprocess whatsapp.exe",
                        "nircmd.exe killprocess discordptb.exe",
                        "nircmd.exe killprocess MusicBee.exe",
                        "nircmd.exe killprocess \"google play music desktop player"
                        );
    end
    
    [email protected] Switch Programs
    actions.alttab = function ()
            kb.down("alt");
            kb.press("tab");
    end
    
    [email protected] Space
    actions.space = function ()
        kb.stroke("space");
    end
    

    posted in Projects read more
  • Jodanzuki

    Updating in case someone else looks for this.
    In the aforementioned link, there's a follow for a change in AngularJS (which Unified Remote uses) that indicates a change in its keycodes, in which semicolon = 186.
    Meaning you can just put in "186" if you want to send a semicolon. Resulting code for clarity:

    [email protected] Next in Playlist
    actions.next = function ()
        kb.stroke("186");
    end
    

    posted in Q&A read more
  • Jodanzuki

    @evelynminnick Thank you for your reply, but I don't understand. Care to elaborate?

    posted in Q&A read more
  • Jodanzuki

    Trying to write a custom remote for youtube tv (youtube.com/tv). Next video in playlist shortcut key is the semicolon key. I couldn't find a match in the github docs for it in Windows. Is the key missing?

    Updating in case someone else looks for this.
    In the link pointed out @evelynminnick below, there's a follow-up link for a change in AngularJS (which Unified Remote uses) that indicates a change in its keycodes, in which semicolon = 186.
    Meaning you can just put in "186" if you want to send a semicolon. Resulting code for clarity:

    [email protected] Next in Playlist
    actions.next = function ()
        kb.stroke("186");
    end
    

    posted in Q&A read more

Internal error.

Oops! Looks like something went wrong!