locked
Keyboard And Mouse RRS feed

  • Question

  • How do I block or even disable Keyboard and Mouse Input?  

    Blockinput () does not work in Windows 7. Even if it does, the user will still gain control if he/she presses CTRL+ALT+DEL.

    Saturday, November 26, 2011 12:07 PM

Answers

  • Hi DJRM,
     
    Thanks for your post in the MSDN Forum.

    As far as I know, if the input is already blocked, the return value is zero. You can try GetLastError to get extended error information.

    Then please try to run the application calling BlockInput as an elevated administrator. It seems that this function needs UAC Administrator privilege on Windows Vista and above.

    Best regards,
    Helen


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us
    • Proposed as answer by Helen Zhao Friday, December 2, 2011 1:17 AM
    • Marked as answer by Helen Zhao Monday, December 5, 2011 1:33 AM
    Monday, November 28, 2011 8:53 AM

All replies

  • The CTRL+ALT+DEL will be alsway reachable. This is by design. This key combination belongs to the winlogon process and can not be blocked.

    It may be possible if you replace the keyboard and mouse driver you can prevent this behaviour, but this would be contrary to the usage of windows.

    In general if CTRL+ALT+DEL does not work anymore the system is in an undefined / instable state and the system should be restarted.

    Saturday, November 26, 2011 2:08 PM
  • Hi DJRM,
     
    Thanks for your post in the MSDN Forum.

    As far as I know, if the input is already blocked, the return value is zero. You can try GetLastError to get extended error information.

    Then please try to run the application calling BlockInput as an elevated administrator. It seems that this function needs UAC Administrator privilege on Windows Vista and above.

    Best regards,
    Helen


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us
    • Proposed as answer by Helen Zhao Friday, December 2, 2011 1:17 AM
    • Marked as answer by Helen Zhao Monday, December 5, 2011 1:33 AM
    Monday, November 28, 2011 8:53 AM
  • Hi DJRM,

     

    I'd like to mark my reply as answer. If you have any other problems, please feel free to let us know. We'll continue working with you on it.

     

    Thanks for your understanding.

    Helen

     


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Monday, December 5, 2011 1:33 AM