本文整理汇总了C#中KeyInput.Empty方法的典型用法代码示例。如果您正苦于以下问题:C# KeyInput.Empty方法的具体用法?C# KeyInput.Empty怎么用?C# KeyInput.Empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyInput
的用法示例。
在下文中一共展示了KeyInput.Empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DefaultValue
//.........这里部分代码省略.........
case CecUserControlCode.Number7:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_NUMPAD7);
break;
case CecUserControlCode.Number8:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_NUMPAD8);
break;
case CecUserControlCode.Number9:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_NUMPAD9);
break;
case CecUserControlCode.Dot:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_SELECT);
break;
case CecUserControlCode.Enter:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_RETURN);
break;
case CecUserControlCode.Clear:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_CLEAR);
break;
case CecUserControlCode.F1Blue:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_F1);
break;
case CecUserControlCode.F2Red:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_F2);
break;
case CecUserControlCode.F3Green:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_F3);
break;
case CecUserControlCode.F4Yellow:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_F4);
break;
case CecUserControlCode.F5:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_F5);
break;
case CecUserControlCode.ChannelUp:
case CecUserControlCode.PageUp:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_MEDIA_NEXT_TRACK);
break;
case CecUserControlCode.ChannelDown:
case CecUserControlCode.PageDown:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_MEDIA_PREV_TRACK);
break;
case CecUserControlCode.VolumeUp:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_VOLUME_UP);
break;
case CecUserControlCode.VolumeDown:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_VOLUME_DOWN);
break;
case CecUserControlCode.Mute:
case CecUserControlCode.MuteFunction:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_VOLUME_MUTE);
break;
case CecUserControlCode.Play:
case CecUserControlCode.PlayFunction:
case CecUserControlCode.Pause:
case CecUserControlCode.PausePlayFunction:
case CecUserControlCode.PauseRecord:
case CecUserControlCode.PauseRecordFunction:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_MEDIA_PLAY_PAUSE);
break;
case CecUserControlCode.Stop:
case CecUserControlCode.StopFunction:
case CecUserControlCode.StopRecord:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_MEDIA_STOP);
break;
case CecUserControlCode.Rewind:
case CecUserControlCode.Backward:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_LEFT);
break;
case CecUserControlCode.Forward:
case CecUserControlCode.FastForward:
keyInput.AddKey(WindowsAPI.VirtualKeyCode.VK_RIGHT);
break;
//currently unmapped
//case CecUserControlCode.NextFavorite:
//case CecUserControlCode.PreviousChannel:
//case CecUserControlCode.SoundSelect:
//case CecUserControlCode.InputSelect:
//case CecUserControlCode.DisplayInformation:
//case CecUserControlCode.Help:
//case CecUserControlCode.Record:
//case CecUserControlCode.Eject:
//case CecUserControlCode.Angle:
//case CecUserControlCode.SubPicture:
//case CecUserControlCode.VideoOnDemand:
//case CecUserControlCode.ElectronicProgramGuide:
//case CecUserControlCode.TimerProgramming:
//case CecUserControlCode.RecordFunction:
//case CecUserControlCode.RestoreVolumeFunction:
//case CecUserControlCode.TuneFunction:
//case CecUserControlCode.SelectMediaFunction:
//case CecUserControlCode.SelectAVInputFunction:
//case CecUserControlCode.SelectAudioInputFunction:
//case CecUserControlCode.Data:
//default:
// break;
}
return keyInput.Empty() ? null : keyInput;
}