0

I realize this is a program switcher key combo in most OSs. Is there a possibility of capturing such an event in the web page via JavaScript?

Shog9
  • 156,901
  • 35
  • 231
  • 235
deostroll
  • 11,661
  • 21
  • 90
  • 161
  • 3
    Personally, I would say go for another key combo. If you do find a way to do this, it's just going to piss people off. – Derek Swingley Aug 16 '09 at 04:15
  • 1
    Sure - see: http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active – Shog9 Aug 16 '09 at 04:16

2 Answers2

5

Of course you can't capture this event, and of course you can't disable it. The browser doesn't own the computer, and you don't own the browser!

Why do you want to do this? Is this for an internal application, or one on the Internet, to be used by anyone?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
2

No, but why would you want to?

Are you looking to do some onfocus or onblur? Maybe those events are useful for you.

Noon Silk
  • 54,084
  • 6
  • 88
  • 105
  • disable the alt+tab feature altogether – deostroll Aug 16 '09 at 04:28
  • onblur works for some reason! it is reliable to some extent. when we hit the windows key atleast in IE it loses focus... – deostroll Aug 16 '09 at 04:47
  • 2
    When you figured out how to disable Alt+Tab, I felt a great disturbance in The Force, as if millions of voices suddenly cried out in terror and were suddenly silenced. I fear something terrible has happened. – Imagist Aug 16 '09 at 05:34
  • I would find disabling alt-tab useful, because then I could pop up an ad that doesn't allow the user to use his computer until he buys $5 worth of my product or reboots. :P See the problem? – froggythefrog Oct 11 '13 at 17:47