Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6881467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:06:40+00:00 2026-05-27T05:06:40+00:00

Im searching other ways to block mouse and keyboard. Some suggest to use BlockInput()

  • 0

Im searching other ways to block mouse and keyboard. Some suggest to use BlockInput(). Can this be done by python? I’m using windows XP

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:06:41+00:00Added an answer on May 27, 2026 at 5:06 am

    Such WinAPI functions can be called using ctypes module.

    You need to know in which DLL the function is. In this case it’s user32.dll (that info is listed on the msdn documentation page you linked).

    Then you need to know its params. This one takes one BOOL argument so we can use Python’s bool directly.

    from ctypes import *
    
    ok = windll.user32.BlockInput(True)
    

    See the explanation of the return value in the docs. The output will be a Python int which is ok in this simple case but you should know that ctypes lets you specifiy the exact argument and return value types if needed.

    I’ve just tried that on Windows 7 box and it works but only if the process is running with elevated privileges (otherwise it just returns 0). Since you’re running XP, this might be irrelevant to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Searching around I haven't found any recent answers to this question. The other answers
How can i get access token for searching venues in foursquare. From this gem,
I'm currently searching for ways I can best display results like a report coupled
I'm implementing a Google Suggest like autocomplete feature for tag searching using jQuery's autocomplete.
I was searching about this topic and I found many ways to convert an
I've been searching this web-site and other sources for an answer, but haven't found
I've tried searching for this, but can't find anything similar. Most questions are about
After searching the developer docs, google and other sites I still can't find how
Bitcounting can be done in several ways, eg. with set bit iterator, unset bit
After searching the other questions none have answered the specific issue I have. We

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.