• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to lock the keys of keyboard

 
Abed Rabie
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

Trying to lock the keys of keyboard using java


Can anyone help me to lock the keys of the keyboard using the java desktop application event handler. I see that this work is done using c and c++.

I thinked about class Runtime but I'm still not reach to anything.

SO if u please try to send me a link for anything talking about this.

If I put this subject in the wrong category in the forum plz advice.

Thanks and best regards

Aabed
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to lock the keys for the entire OS or just in your Java app. If you are trying the latter, noper. Not gonna work. Not without JNI anyway, which would require that c/c++ you mentioned.
 
Abed Rabie
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friend,

So if I need to lock it from within the operating system. What solution you recommend.

Thanks and best regards

Aabed
 
Abed Rabie
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

Hi for u all

So is there any other way that I can do locking for keyboard without using JNI or it's imposible without JNI.

best regards

Aabed
 
Pritam Barhate
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From your post what I gather is that you want to block keyboard input for intire operating system from within your java application.

To best of my knowledge this impossible without JNI. It has to be done through a native c/c++ method. In case you want to know how it is tobe done in windows through c++ try finding information on "Programming Windows Hooks". There is lot of information available on MSDN.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!