• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to disable keyboard input

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm developing a cybercafe management client/server application, and I have a very hard task in hand.
I need that clients machines, when unauthorized to be used, have both mouse and keyboard disabled, while the screen shows nothing but a "Welcome to the cyber - for navigating contact cyber operator", absolutely nothing else. Then when the operator authorizes the machine, OS is shown.
The idea is to make a multiplaform app for both client and server.

I already know how to freeze the screen, but when the user presses alt+ctrl+delete, or alt+tab, or the windows OS start key my magic window dissapears. I already implemented the KeyListener interface and captured and consumed all the keyboard events, and it still won't work.

Help me please, I'm kinda desperate
XM
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You won't be able to do this in pure Java; you'll need to use heavy Windows native-code voodoo, especially to block Ctrl-Alt-Delete.
 
Ranch Hand
Posts: 1970
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought it was supposed to be genuinely impossible to intercept Ctrl-Alt-Del in Windows. The idea is to prevent trojans. Don't take this as Gospel, though; I could be wrong.

You may have better luck with Alt-Tab.
 
Marx Villegas
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot! I'll figure something else out
XM
 
Marx Villegas
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,
It is possible to catch the ALT+CTRL+DEL and a whole bunch of windows OS's magical keystrokes: Microsoft Visual C++ makes it possible.
Do you think it is a good idea to use native methods in my java project?
I would do it all in java, but the ALT+CTRL+DEL enable/disable routines in C++. Is it possible? is it viable? Is it a good or bad idea?
Thanks
XM
[ June 30, 2006: Message edited by: Marx Villegas ]
 
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given we have very limited information about the context and requirements it's hard to make such a sweeping judgement. It's certainly possible and probably beneficial. Instead of having 'native methods' you can use JNI instead. Write the bulk of the project in Java and call native programs where it's needed.
 
Marx Villegas
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Ken. I'm actually using JNI, and I've fought C++ all day long.
I'll get the code published as soon as I finish it.
Thank you all
Marx
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why reinvent the wheel? You could find many opensource cybercafe softwares (written in java) at sourceforge.net
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey can anybody help me? while searching for solution i end up here. i am trying to make screen locker within the college management system in java where only correct password will unlock it. please help
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The same thing that was true in 2006 is still true today: you cannot do this with pure Java; you'll need to program native code for your operating system to do this.
 
Bring out your dead! Or a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic