2012-05-22, 14:30
I also wrote a little autohotkey-script which waits after a hit on epg or the user button for a hit on a number button:
User and number button will execute some autohotkey actions
EPG and number button will return the pressed number combined with shift and alt, which can be used in the remote.xml in xbmc's userdata-folder to perform xbmc built-in-functions(see second quote)
I know the code isnt written very well, but it works
Just download and install autohotkey, c&p the following script and have fun!
In the remote.xml (create it userdata/keymaps/) i also remapped the colored buttons to get an behaviour close to my former xbox-remote
Thanks to mnk6 (pulse-eight-forum) for youre inspiration
User and number button will execute some autohotkey actions
EPG and number button will return the pressed number combined with shift and alt, which can be used in the remote.xml in xbmc's userdata-folder to perform xbmc built-in-functions(see second quote)
I know the code isnt written very well, but it works
Just download and install autohotkey, c&p the following script and have fun!
Code:
#InstallKeybdHook
F4::
Input, User,L1,,
if (User = "1") ;**************Turn Monitor Off**************************
{
Sleep 200
SendMessage ,0x112, 0xF170, 2,,Program Manager
return
}
if (User ="2") ;**************Kill and restart XBMC*********************
{
Process,Close,XBMC.exe
Sleep 1000
Run, "C:\Program Files\XBMC\XBMC"
return
}
if (User ="3") ;**************Close the aktive Window*********************
{
WinClose, A
return
}
if (User ="4")
{
return
}
if (User ="5")
{
return
}
if (User ="6")
{
return
}
if (User ="7")
{
return
}
if (User ="8")
{
return
}
if (User ="9")
{
return
}
if (User ="0")
{
return
}
if (Errorlevel) ;*************************no or wrong key pressed*************
{
return
}
else return
return
F3::
Input, epg,L1,,
if (Epg = "1")
{
Sleep 200
SendInput ^!1
return
}
if (Epg ="2")
{
Sleep 200
SendInput ^!2
return
}
if (Epg ="3")
{
Sleep 200
SendInput ^!3
return
}
if (Epg ="4")
{
Sleep 200
SendInput ^!4
return
}
if (Epg ="5")
{
Sleep 200
SendInput ^!5
return
}
if (Epg ="6")
{
Sleep 200
SendInput ^!6
return
}
if (Epg ="7")
{
Sleep 200
SendInput ^!7
return
}
if (Epg ="8")
{
Sleep 200
SendInput ^!8
return
}
if (Epg ="9")
{
Sleep 200
SendInput ^!9
return
}
if (Epg ="0")
{
Sleep 200
SendInput ^!0
return
}
if (Errorlevel)
{
return
}
else return
return
In the remote.xml (create it userdata/keymaps/) i also remapped the colored buttons to get an behaviour close to my former xbox-remote
Code:
<keymap>
<global>
<keyboard name="Motorola Nyxboard Hybrid">
<f3 mod="shift">ContextMenu</f3> <!-- Red -->
<f4 mod="shift">FullScreen</f4> <!-- Green -->
<f5 mod="shift">Playlist</f5> <!-- Yellow -->
<f6 mod="shift">OSD</f6> <!-- Blue -->
<!--f3>Controlled by AutoHotkey</f3--> <!-- EPG -->
<!--f4>Controlled by AutoHotkey</f4--> <!-- USER -->
<one mod="ctrl,alt">XBMC.AlarmClock(shutdowntimer,XBMC.Powerdown(),60)</one>
<two mod="ctrl,alt">-</two>
<three mod="ctrl,alt">-</three>
<four mod="ctrl,alt">-</four>
<five mod="ctrl,alt">-</five>
<six mod="ctrl,alt">-</six>
<seven mod="ctrl,alt">-</seven>
<eight mod="ctrl,alt">-</eight>
<nine mod="ctrl,alt">-</nine>
<zero mod="ctrl,alt">-</zero>
</keyboard>
</global>
</keymap>
Thanks to mnk6 (pulse-eight-forum) for youre inspiration