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

Can I catch CTRL+ALT+DEL in java ?

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was trying to write a java program that will sense automatically the press of CTRL+ALT+DEL

Like I want to create a file through my java program ,that how many times the CTRL+ALT+DEL was pressed and the time diference
between them .

can anyboby help on this .
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check the following thread.
 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that can be done.
 
Sheriff
Posts: 22816
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree. Windows catches several key strokes before they are sent to applications. Ctrl+Alt+Del is one of those; even VMware cannot disallow Windows handling it. (That's what you get when the VMware virtual machine is running in full-screen mode )
 
salvin francis
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I doubt it has anything to do with the os.
I feel its an interrupt key sequence that is set in ROM BIOS,
Windows merely senses this interrupt, so does linux.
 
Rob Spoor
Sheriff
Posts: 22816
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not the ROM BIOS, it's the keyboard / keyboard port on the motherboard. The BIOS has its own keyboard drivers for handling several keystrokes (like those needed to enter the BIOS). That's why Ctrl+Alt+Del reboots your PC when you're still in the BIOS post screen but it will show a screen in Windows (and reboot in Windows 95/98 if pressed twice). In Linux you can specify what to do when you press Ctrl+Alt+Del.

In short, the operating system (BIOS is also an operating system; that's what the OS stands for) handles keyboard interrupts it receives through the keyboard driver, and decides what to do with them. The only way to catch Ctrl+Alt+Del in Java is intercept the interrupts inside the keyboard driver before Windows / Linux gets them. I don't know if that's even possible, but if it is you will have to use a lot of JNI.
 
Politics n. Poly "many" + ticks "blood sucking insects". 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