2006-05-12, 02:26 AM
the remote key presses are these by default
play - ctrl P
stop - ctrl S
pause - ctrl Q
skip - ctrl right
prev - ctrl left
ff - ctrl f
rwd - ctrl d
so in the keypress you can use
or you could use a keymappings file which will allow the user to change the keys to whatever they like.
that shouild get you started...
play - ctrl P
stop - ctrl S
pause - ctrl Q
skip - ctrl right
prev - ctrl left
ff - ctrl f
rwd - ctrl d
so in the keypress you can use
Code:
bool handled = false; // return this to tell gbpvr that we handled the keypress so it wont
if(e.KeyCode== Keys.Right && e.Control)
{
// do some with the skip button
handled = true;
}
or you could use a keymappings file which will allow the user to change the keys to whatever they like.
Code:
private GBPVR.Public.KeyCommandHelper helper;
// create the keymappings helper
private void init(){
helper = new GBPVR.Public.KeyCommandHelper("my plugin.xml");
}
public bool onkeydown(System.Windows.Forms.KeyEventArgs e){
// this will return the name of the command that goes allong with the key press
// eg "Menu", "Play" check other keymapping files for other examples
string command = helper.KeyMapping(e);
if(command == BUTTON_PLAY){
}
}
that shouild get you started...