Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: Lock keyboard and mouse inputs

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lock keyboard and mouse inputs

    Hi everyone, Which methods can be used to lock keyboard and mouse inputs using java??


  2. #2
    Member
    Join Date
    Mar 2012
    Location
    United States
    Posts
    118
    My Mood
    Inspired
    Thanks
    1
    Thanked 33 Times in 31 Posts

    Default Re: Lock keyboard and mouse inputs

    What do you mean by "lock". Do you mean preventing the use of the keyboard and/or mouse?

  3. #3
    Junior Member
    Join Date
    Mar 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Lock keyboard and mouse inputs

    Yeah even if user press any key or use mouse no event should occur.

  4. #4
    Member
    Join Date
    Mar 2012
    Location
    United States
    Posts
    118
    My Mood
    Inspired
    Thanks
    1
    Thanked 33 Times in 31 Posts

    Default Re: Lock keyboard and mouse inputs

    I see, while this may or may not be possible I won't be able to help with this one due to the possible malicious usage. Sorry.

  5. #5
    Member
    Join Date
    Feb 2014
    Posts
    180
    Thanks
    0
    Thanked 48 Times in 45 Posts

    Default Re: Lock keyboard and mouse inputs

    Quote Originally Posted by vaibhavi View Post
    Hi everyone, Which methods can be used to lock keyboard and mouse inputs using java??
    You might want to elaborate further the context of your question. E.g., if you're thinking of being able to embed onto a web page a Java applet that does this, well, you're on your own. If it is for a different (not potentially malicious) context, then please elaborate.

  6. #6
    Junior Member
    Join Date
    Mar 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Lock keyboard and mouse inputs

    KucerakJM : I can understand but I would like to clarify here, I want to use it for my project of classroom management. So I want to use it legally with my professor's guidance.
    It would be great if you can help me else it's all your wish.
    Thank You.

    --- Update ---

    jashburn: I am doing project on classroom management that ensures classes run smoothly. I am not at all using it for any potentially malicious context.
    If it is possible through Java Applet or any other source in java it would be great if you can help me.
    Still not okay with the purpose let me know.
    Thank You.

  7. #7
    Member
    Join Date
    Mar 2012
    Location
    United States
    Posts
    118
    My Mood
    Inspired
    Thanks
    1
    Thanked 33 Times in 31 Posts

    Default Re: Lock keyboard and mouse inputs

    I have actually worked on similar applications myself, just not in java, and I am fairly certain that you will need to go into the JNI/JNA realm to achieve what you are looking for.

  8. #8
    Member
    Join Date
    Feb 2014
    Posts
    180
    Thanks
    0
    Thanked 48 Times in 45 Posts

    Default Re: Lock keyboard and mouse inputs

    Does it have to be implemented from scratch? If not, just search the Internet using the search term "lock keyboard mouse". You'll find off-the-shelf utilities that are used for preventing toddlers and pets from messing up the PC/laptop. Or, thinking outside the box, just ask your professor to install a large mirror at the back of the classroom!

Similar Threads

  1. Replies: 0
    Last Post: October 14th, 2013, 08:30 PM
  2. Class level Lock vs Object level lock
    By hs82 in forum Java Theory & Questions
    Replies: 0
    Last Post: October 14th, 2013, 10:17 AM
  3. Combination lock
    By Pinares in forum What's Wrong With My Code?
    Replies: 11
    Last Post: February 26th, 2013, 05:56 PM
  4. How do you define things from specific keyboard inputs?
    By JavaN00b101 in forum Java Theory & Questions
    Replies: 2
    Last Post: November 30th, 2011, 11:30 PM
  5. How to create a system wide mouse or keyboard hook?
    By Freaky Chris in forum Java Native Interface
    Replies: 17
    Last Post: June 17th, 2009, 01:06 PM