//模拟ctrl+回车
keybd_event(VK_CONTROL, 0, 0, 0);
keybd_event(VK_RETURN, 0, 0, 0);
keybd_event(VK_RETURN, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);

 

模拟Shift+End

 

    keybd_event( VK_SHIFT, 0x2A, 0, 0 );
    keybd_event( VK_END, 0x4F, KEYEVENTF_EXTENDEDKEY | 0, 0 );
    keybd_event( VK_END, 0x4F, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0 );
    keybd_event( VK_SHIFT, 0x2A, KEYEVENTF_KEYUP, 0 );

 

键盘代码定义

https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

http://kbdedit.com/manual/low_level_vk_list.html

  • VK_CANCELVK_TAB、VK_RETURN
  • VK_VOLUME_MUTE、VK_VOLUME_DOWN、VK_VOLUME_UP

C#实现的静音,音量控制代码

http://blog.csdn.net/lsfa1234/article/details/6286525

posted on 2015-11-16 21:24  lypzxy  阅读(577)  评论(0编辑  收藏  举报