0

I want to focus on my browser's previous tabs, so i want to trigger browser tab by triggering key-code. How to do this thing using key code.(and i don't find any keycode for "ctrl+pageup")

Ishan Jain
  • 8,063
  • 9
  • 48
  • 75

1 Answers1

2

That ain't possible.

You can't trigger OS/Browser functions like keypresses from JavaScript.

If this were possible, imagine the problems it would cause by:

  • sites making you save stuff. (Ctrl+S -> Enter)
  • sites making you close things. (Alt+F4)
  • sites making you open new tabs. (Ctrl+T)
  • etc.

You can only simulate these keypresses within the page's JS.

Community
  • 1
  • 1
Cerbrus
  • 70,800
  • 18
  • 132
  • 147
  • 1
    @ishanJain: I realise this isn't the answer you're looking for, but, not to brag or anything, it is the only valid answer to this question. As such, please consider [Marking this as the answer](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work). – Cerbrus Jan 07 '13 at 07:35