# Copyright (c) 2001 Mike Baker (mbm@linux.com) # $Id: webremote.itcl,v 1.2 2005/08/03 06:02:46 davidlallen Exp $ # $Id: webremote.itcl,v 1.2 2005/08/03 06:02:46 davidlallen Exp $ # # The sendkey form portion of this code and modifications # Copyright (c) 2001 Mike Langley (mlangley@owt.com), v1.1 if {$::version > 4} {continue} proc action_sendkey {chan path env} { global db global evrc evmw global url_prefix if {![info exists evrc(tivo)]} { source $::tcl_library/tv/sendkey.tcl # disable keyname echoing to controling tty set ::verboseSendKeyG 0 } eval $env 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 slow advance" $key] if {$index >= 0} { set key [lindex "thumbsdown volumeUp volumeDown surfup surfdown playslow catchup" $index] } if {[info exists evrc($key)] || [info exists evmw($key)] || $key == "wait"} { if {$key != "wait"} { SendKey $key } else { after 750 } } } } puts $chan [html_start "Web Remote"] puts $chan " " set dir "/${url_prefix}sendkey/" puts $chan "[html_link "${dir}?type=text" "\[TEXT\]"]  [html_link "${dir}?type=image" "\[IMAGE\]"]

" if { ![info exists type] || $type == "" } { set type "image" } if { $type == "text" } { puts $chan "
WEB REMOTE
PowerTiVoLiveTV
ListGuideInfo
 
 UP 
LEFT RIGHT
 DOWN 
 
ThumbsDnSelectThumbsUp
 
VolUpMuteChanUp
VolDnRecordChanDn
 
 Play 
ReversePauseForward
ReplaySlowAdvance
 
123
456
789
clear0Enter
" } elseif { $type == "image" } { puts $chan " " } # Adding shortcut key table puts $chan "
Key Action
<Up Arrow> <Enter> Play
<Right Arrow> '\]' Forward
<Left Arrow> '\[' Reverse
<Space Bar> 'p' Pause
<Down Arrow> 'a' Advance
'/' <Backspace> Replay
" puts $chan [html_end] } register_module "sendkey" "Web Remote" "A Web-based Remote Control for your TiVo"