• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Trying to lock the keys of keyboard

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic