PlugIn Development:GameEx Input MCE Remote Function
This function is called when the user presses a button on the MCE remote.
Parameters
Key [integer]: A number representing the key code.
Command [integer]: A number representing the command code.
Raw [integer]: A number representing the raw code.
Parameter Values
The Key integer can be converted to an MCE_Remote_Key via the supplied enumeration.
The Command integer can be converted to an MCE_Remote_Command via the supplied enumeration.
The Raw integer can be converted to an MCE_Remote_Raw via the supplied enumeration.
Returns
This function returns a boolean value.
Return Values
Return true and GameEx will process the MCE Remote button press.
Return false and GameEx will not process the MCE Remote button press.
Enumerators
The enums below outline the the data converted frim integer values in the PlugIn.dll file.
VB.NET
Key Enumeration
Public Enum MCE_Remote_Key MCEButton_OK = 13 MCEButton_Clear = 27 MCEButton_MoveLeft = 37 MCEButton_MoveUp = 38 MCEButton_MoveRight = 39 MCEButton_MoveDown = 40 MCEButton_Number0 = 48 MCEButton_Number1 = 49 MCEButton_Number2 = 50 MCEButton_Number3 = 51 MCEButton_Number4 = 52 MCEButton_Number5 = 53 MCEButton_Number6 = 54 MCEButton_Number7 = 55 MCEButton_Number8 = 56 MCEButton_Number9 = 57 MCEButton_Number0_2 = 58 End Enum
Command Enumeration
Public Enum MCE_Remote_Command MCEButton_Back = 65536 MCEButton_Skip = 720896 MCEButton_Replay = 786432 MCEButton_Stop = 851968 MCEButton_Play = 271450112 MCEButton_Pause = 271515648 MCEButton_Record = 271581184 MCEButton_Forward = 271646720 MCEButton_Rewind = 271712256 MCEButton_ChannelUp = 271777792 MCEButton_ChannelDown = 271843328 End Enum
Raw Enumeration
Public Enum MCE_Remote_Raw MCEButton_MoreInfo = 9 MCEButton_DVDMenu = 36 MCEButton_LiveTV = 37 MCEButton_MyTV = 70 MCEButton_MyMusic = 71 MCEButton_RecordedTV = 72 MCEButton_MyPictures = 73 MCEButton_MyVideos = 74 MCEButton_DVDAngle = 75 MCEButton_DVDAudio = 76 MCEButton_DVDSubtitle = 77 MCEButton_OEM1 = 128 MCEButton_OEM2 = 129 MCEButton_Guide = 141 MCEButton_Mute = 226 MCEButton_VolumeUp = 233 MCEButton_VolumeDown = 234 End Enum
C#
Key Enumeration
public enum MCE_Remote_Key : uint { MCEButton_OK = 13, MCEButton_Clear = 27, MCEButton_MoveLeft = 37, MCEButton_MoveUp = 38, MCEButton_MoveRight = 39, MCEButton_MoveDown = 40, MCEButton_Number0 = 48, MCEButton_Number1 = 49, MCEButton_Number2 = 50, MCEButton_Number3 = 51, MCEButton_Number4 = 52, MCEButton_Number5 = 53, MCEButton_Number6 = 54, MCEButton_Number7 = 55, MCEButton_Number8 = 56, MCEButton_Number9 = 57, MCEButton_Number0_2 = 58, }
Command Enumeration
public enum MCE_Remote_Command : uint { MCEButton_Back = 65536, MCEButton_Skip = 720896, MCEButton_Replay = 786432, MCEButton_Stop = 851968, MCEButton_Play = 271450112, MCEButton_Pause = 271515648, MCEButton_Record = 271581184, MCEButton_Forward = 271646720, MCEButton_Rewind = 271712256, MCEButton_ChannelUp = 271777792, MCEButton_ChannelDown = 271843328, }
Raw Enumeration
public enum MCE_Remote_Raw : uint { MCEButton_MoreInfo = 9, MCEButton_DVDMenu = 36, MCEButton_LiveTV = 37, MCEButton_MyTV = 70, MCEButton_MyMusic = 71, MCEButton_RecordedTV = 72, MCEButton_MyPictures = 73, MCEButton_MyVideos = 74, MCEButton_DVDAngle = 75, MCEButton_DVDAudio = 76, MCEButton_DVDSubtitle = 77, MCEButton_OEM1 = 128, MCEButton_OEM2 = 129, MCEButton_Guide = 141, MCEButton_Mute = 226, MCEButton_VolumeUp = 233, MCEButton_VolumeDown = 234, }
Code Examples
VB.NET
Public Function Input_MCERemote(ByVal Key As Integer, ByVal Command As Integer, ByVal Raw As Integer) As Boolean Select Case Key Case MCE_Remote_Key.MCEButton_OK Exit Select Case MCE_Remote_Key.MCEButton_Clear Exit Select Case MCE_Remote_Key.MCEButton_MoveLeft Exit Select Case MCE_Remote_Key.MCEButton_MoveUp Exit Select Case MCE_Remote_Key.MCEButton_MoveRight Exit Select Case MCE_Remote_Key.MCEButton_MoveDown Exit Select Case MCE_Remote_Key.MCEButton_Number0 Exit Select Case MCE_Remote_Key.MCEButton_Number1 Exit Select Case MCE_Remote_Key.MCEButton_Number2 Exit Select Case MCE_Remote_Key.MCEButton_Number3 Exit Select Case MCE_Remote_Key.MCEButton_Number4 Exit Select Case MCE_Remote_Key.MCEButton_Number5 Exit Select Case MCE_Remote_Key.MCEButton_Number6 Exit Select Case MCE_Remote_Key.MCEButton_Number7 Exit Select Case MCE_Remote_Key.MCEButton_Number8 Exit Select Case MCE_Remote_Key.MCEButton_Number9 Exit Select Case MCE_Remote_Key.MCEButton_Number0_2 Exit Select End Select Select Case Command Case MCE_Remote_Command.MCEButton_Back Exit Select Case MCE_Remote_Command.MCEButton_Skip Exit Select Case MCE_Remote_Command.MCEButton_Replay Exit Select Case MCE_Remote_Command.MCEButton_Stop Exit Select Case MCE_Remote_Command.MCEButton_Play Exit Select Case MCE_Remote_Command.MCEButton_Pause Exit Select Case MCE_Remote_Command.MCEButton_Record Exit Select Case MCE_Remote_Command.MCEButton_Forward Exit Select Case MCE_Remote_Command.MCEButton_Rewind Exit Select Case MCE_Remote_Command.MCEButton_ChannelUp Exit Select Case MCE_Remote_Command.MCEButton_ChannelDown Exit Select End Select Select Case Raw Case MCE_Remote_Raw.MCEButton_MoreInfo Exit Select Case MCE_Remote_Raw.MCEButton_DVDMenu Exit Select Case MCE_Remote_Raw.MCEButton_LiveTV Exit Select Case MCE_Remote_Raw.MCEButton_MyTV Exit Select Case MCE_Remote_Raw.MCEButton_MyMusic Exit Select Case MCE_Remote_Raw.MCEButton_RecordedTV Exit Select Case MCE_Remote_Raw.MCEButton_MyPictures Exit Select Case MCE_Remote_Raw.MCEButton_MyVideos Exit Select Case MCE_Remote_Raw.MCEButton_DVDAngle Exit Select Case MCE_Remote_Raw.MCEButton_DVDAudio Exit Select Case MCE_Remote_Raw.MCEButton_DVDSubtitle Exit Select Case MCE_Remote_Raw.MCEButton_OEM1 Exit Select Case MCE_Remote_Raw.MCEButton_OEM2 Exit Select Case MCE_Remote_Raw.MCEButton_Guide Exit Select Case MCE_Remote_Raw.MCEButton_Mute Exit Select Case MCE_Remote_Raw.MCEButton_VolumeUp Exit Select Case MCE_Remote_Raw.MCEButton_VolumeDown Exit Select End Select Return True End Function
C#
public bool Input_MCERemote(uint Key, uint Command, uint Raw) { switch (Key) { case (uint) MCE_Remote_Key.MCEButton_OK: break; case (uint) MCE_Remote_Key.MCEButton_Clear: break; case (uint) MCE_Remote_Key.MCEButton_MoveLeft: break; case (uint) MCE_Remote_Key.MCEButton_MoveUp: break; case (uint) MCE_Remote_Key.MCEButton_MoveRight: break; case (uint) MCE_Remote_Key.MCEButton_MoveDown: break; case (uint) MCE_Remote_Key.MCEButton_Number0: break; case (uint) MCE_Remote_Key.MCEButton_Number1: break; case (uint) MCE_Remote_Key.MCEButton_Number2: break; case (uint) MCE_Remote_Key.MCEButton_Number3: break; case (uint) MCE_Remote_Key.MCEButton_Number4: break; case (uint) MCE_Remote_Key.MCEButton_Number5: break; case (uint) MCE_Remote_Key.MCEButton_Number6: break; case (uint) MCE_Remote_Key.MCEButton_Number7: break; case (uint) MCE_Remote_Key.MCEButton_Number8: break; case (uint) MCE_Remote_Key.MCEButton_Number9: break; case (uint) MCE_Remote_Key.MCEButton_Number0_2: break; } switch(Command) { case (uint) MCE_Remote_Command.MCEButton_Back: break; case (uint) MCE_Remote_Command.MCEButton_Skip: break; case (uint) MCE_Remote_Command.MCEButton_Replay: break; case (uint) MCE_Remote_Command.MCEButton_Stop: break; case (uint) MCE_Remote_Command.MCEButton_Play: break; case (uint) MCE_Remote_Command.MCEButton_Pause: break; case (uint) MCE_Remote_Command.MCEButton_Record: break; case (uint) MCE_Remote_Command.MCEButton_Forward: break; case (uint) MCE_Remote_Command.MCEButton_Rewind: break; case (uint) MCE_Remote_Command.MCEButton_ChannelUp: break; case (uint) MCE_Remote_Command.MCEButton_ChannelDown: break; } switch(Raw) { case (uint) MCE_Remote_Raw.MCEButton_MoreInfo: break; case (uint) MCE_Remote_Raw.MCEButton_DVDMenu: break; case (uint) MCE_Remote_Raw.MCEButton_LiveTV: break; case (uint) MCE_Remote_Raw.MCEButton_MyTV: break; case (uint) MCE_Remote_Raw.MCEButton_MyMusic: break; case (uint) MCE_Remote_Raw.MCEButton_RecordedTV: break; case (uint) MCE_Remote_Raw.MCEButton_MyPictures: break; case (uint) MCE_Remote_Raw.MCEButton_MyVideos: break; case (uint) MCE_Remote_Raw.MCEButton_DVDAngle: break; case (uint) MCE_Remote_Raw.MCEButton_DVDAudio: break; case (uint) MCE_Remote_Raw.MCEButton_DVDSubtitle: break; case (uint) MCE_Remote_Raw.MCEButton_OEM1: break; case (uint) MCE_Remote_Raw.MCEButton_OEM2: break; case (uint) MCE_Remote_Raw.MCEButton_Guide: break; case (uint) MCE_Remote_Raw.MCEButton_Mute: break; case (uint) MCE_Remote_Raw.MCEButton_VolumeUp: break; case (uint) MCE_Remote_Raw.MCEButton_VolumeDown: break; } return true; }