From WiiLi
//Wiimote Windows Media Center Controller v2
//Created by Computerdude28
//Edited by Amorphism (edit notes at the end)
//-------------------------------------- -----------
//Buttons And Controls on the Wiimote
//Accept the Selection/Go to Last Channel - A
//Back to the Previous Screen - B
//-------------------------------------- -----------
//Toggle LED1 and 2 - One and Two
//IF LED1 IS ON
//Left/Right/Up/Down - Left/Right/Up/Down
//Home - Windows Media Center Start screen
//Minus - Display the Context Menu
//Plus - Guide
//IF LED2 IS ON
//Left/Right/Up/Down - Volume Down/Volume Up/Chanel Up/Channel Down
//Home - Play/Pause
//Minus - Back
//Plus - Next
//-------------------------------------- -----------
//Static Controls
key.enter = wiimote.A
key.backspace = wiimote.B
//Variable Changer & LED1 and 2
if wiimote.two then
var.led12 = true
endif
if wiimote.one then
var.led12 = false
endif
if var.led12 = false then
wiimote.led1 = true
else
wiimote.led1 = false
endif
if var.led12 = true then
wiimote.led2 = true
else
wiimote.led2 = false
endif
//Dynamic Controls Config - LED1
if var.led12 = false then
//ARROWS
key.left = wiimote.left
key.right = wiimote.Right
key.up = wiimote.Up
key.down = wiimote.Down
//Home/Minus/Plus
if pressed(wiimote.Home) then
press(key.Windows)
wait 50ms
press(key.Alt)
wait 50ms
press(key.Enter)
wait 50ms
key.alt = true
key.alt = false
key.windows = false
endif
key.AppMenu = wiimote.Minus
key.RightControl && key.g = wiimote.Plus
endif
//Dynamic Controls Config - LED2
if var.led12 = true then
//ARROWS
if wiimote.Left = false then // Edit #2
var.leftvol = 0 // Edit continued
endif // down to line 103
if wiimote.Right = false then
var.rightvol = 0
endif
if wiimote.Left = true
if var.leftvol >= 10 then
press(key.F9)
key.F9 = false
wait 25ms
else
press(key.F9)
key.F9 = false
wait 150ms
var.leftvol = var.leftvol + 1
endif
endif
if wiimote.Right = true
if var.rightvol >= 10 then
press(key.F10)
key.F10 = false
wait 25ms
else
press(key.F10)
key.F10 = false
wait 150ms
var.rightvol = var.rightvol + 1
endif
endif // Edit #2 Ends
key.PageUp = wiimote.Up
key.pagedown = wiimote.Down
//Home/Minus/Plus
if pressed(wiimote.home) then
press(key.PlayPause)
key.PlayPause = false // Edit #1
endif
key.control && key.F = wiimote.Plus
key.control && key.B = wiimote.Minus
endif
//Notes:
//
//Edit #1: (line 111)
//Stops Play/Pause RunAway.
//
//Edit #2: (lines 74 to 103
//Gives more control over volume.
//The volume change starts off slow then,
//speeds up after holding it for a second.
//
//Edited By Amorphism