variable compat "2.1.b3" # Copyright (c) 2001 Mike Baker (mbm@linux.com) # The sendkey form portion of this code and modifications # Copyright (c) 2001 Mike Langley (mlangley@owt.com), v1.1 #don't load at all if sendkey not installed if {$::sendkeyavail != 1} {continue} proc action_sendkey {chan path env} { global db global evrc evmw eval_env #allow user to change type. set defaults if not set. if [info exists type] { set ::webremote_type $type } else { if ![info exists ::webremote_type] { if $::is_mobile { set ::webremote_type "b" } elseif $::is_mapple { set ::webremote_type "a" } else { set ::webremote_type "i" } } } if {[string index $path 0] == "/"} { set path [string range $path 1 end] set cmds [split $path "/,"] foreach key $cmds { set index [lsearch "thumbsdn volup voldown chanup chandn channelup channeldown slow advance catchup" $key] if {$index >= 0} { # My v2.5.5 and v3.0 sendkey uses surfup/down rather than channelup/down # It seems that newer versions require channelup/down. if {$::version <= 4} { set key [lindex "thumbsdown volumeUp volumeDown surfup surfdown surfup surfdown playslow catchup catchup" $index] } else { set key [lindex "thumbsdown volumeUp volumeDown channelup channeldown channelup channeldown playslow advance advance" $index] } } if {[info exists evrc($key)] || [info exists evmw($key)] || $key == "wait"} { if {$key != "wait"} { SendKey $key } else { after 750 } } } #if called as ajax, just return with message if {[info exists ajax]} { puts $chan "sent [strim $cmds]" return } } set dir "/$::conf(Prefix)sendkey/" if { $::webremote_type == "b" } { set menu "no-menu" } else { set menu "" } puts $chan [html_start "Web Remote" "$menu"] puts $chan [js -nomobile keytrap2] if { $::webremote_type == "t" } { puts $chan "
WEB REMOTE | ||
---|---|---|
Power | TiVo | LiveTV |
List | Guide | Info |
Exit | Window | |
UP | ||
LEFT | RIGHT | |
DOWN | ||
ThumbsDn | Select | ThumbsUp |
VolUp | Mute | ChanUp |
VolDn | Record | ChanDn |
Play | ||
Reverse | Pause | Forward |
Replay | Slow | Advance |
1 | 2 | 3 |
4 | 5 | 6 |
7 | 8 | 9 |
clear | 0 | Enter |