• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Alt + Tab, Ctl + Esc

 
raj varma
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my full screen application, How do i stop user to doing Alt Tab or Ctl Esc to toggle the application.
I have tried consuming these events but alas.
As b4 applcation recognize these key typed event, Windows OS recognize them.
Anybody does have any idea to overcome this situation. Please Help
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't even think I've seen a regular windows application that overrides these... ?!?!
 
Yoo-Jin Lee
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
With Java 1.4, a new key board manager was created. It's very powerfull. Basically, you capture all the keyboard events and either take an action then pass on the event or else you can stop passing the key board event so no other listener will get a key event.
In the following example I capture Ctr+V.
ie.

[ April 03, 2003: Message edited by: Yoo-Jin Lee ]
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I would hope it can't be done. would be like the unrequested javascript popup windows. why annoying the user?
chantal
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry... but this doesn't work... here's the code modified to listener for Alt-Tab and Ctrl-Esc. Since the Windows OS is actually listening to the keyboard and providing data to all other programs, I don't think you can override this in any way.

 
raj varma
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Natan this program also not capturing alt tab , Ctl Esc. code value has got either alt or cntl.It never prints "Captured alt tab" or "captured ctrl Esc". plz run program again with ur fuction with additional checks to get idea.

Originally posted by Nathan Pruett:
Sorry... but this doesn't work... here's the code modified to listener for Alt-Tab and Ctrl-Esc. Since the Windows OS is actually listening to the keyboard and providing data to all other programs, I don't think you can override this in any way.

 
Yoo-Jin Lee
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Just a thought. If you can't consume these events in java it may be possible to use an activex control. That means you have to create or use someone's native windows tool to do this - if this is possible. I've never tried it myself. In any case why would you want to stop the user from toggling between applications? Seems to me you'd make the user angry by stopping them doing this?
-Yoo-Jin
 
raj varma
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Lee, Answer for ur question for annoying user is -
Full screen application is made for Cyber Cafe unless and untill user log's in it won;t allow user to access computer. After loggging in applcation, Minimize button which is provided in applcation is setEnabled.
Originally posted by Yoo-Jin Lee:
Hi,
Just a thought. If you can't consume these events in java it may be possible to use an activex control. That means you have to create or use someone's native windows tool to do this - if this is possible. I've never tried it myself. In any case why would you want to stop the user from toggling between applications? Seems to me you'd make the user angry by stopping them doing this?
-Yoo-Jin
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry... I knew the modified code didn't work. I thought I mentioned that in the text of the post. Guess I should have made it more clear...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic