Normal
Well, for overwriting keys....I don't think you should overwrite them. Generally you would react to ACTIONS (which are caused by the user pressing whatever key, be it on the remote or keyboard, that the user has assigned to that ACTION. In the plugin you then intercept the ACTION (and not a keypress directly) and react accordingly.Lets say you wanted to do something when the user presses stop (which defaults to the 'b' button the keyboard, but the user can overwrite this in the configuration to whatever key he/she wants. The code would look something like this:[CODE]public override void OnAction(Action action){ switch (action.wID) { case Action.ActionType.ACTION_STOP: // do whatever here break; default: // let MP handle all other actions base.OnAction(action); break; }}[/CODE]
Well, for overwriting keys....I don't think you should overwrite them. Generally you would react to ACTIONS (which are caused by the user pressing whatever key, be it on the remote or keyboard, that the user has assigned to that ACTION. In the plugin you then intercept the ACTION (and not a keypress directly) and react accordingly.
Lets say you wanted to do something when the user presses stop (which defaults to the 'b' button the keyboard, but the user can overwrite this in the configuration to whatever key he/she wants. The code would look something like this:
[CODE]public override void OnAction(Action action)
{
switch (action.wID)
case Action.ActionType.ACTION_STOP:
// do whatever here
break;
default:
// let MP handle all other actions
base.OnAction(action);
}
}[/CODE]