CodingDiv Positioning + Other stuff

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  af (CAER)  
 To:  ANT_THOMAS      
37806.8 In reply to 37806.7 
A quick search suggests keyboard event detection is a bitch.
However, this page offers some clues.
javascript code:
 
var keyDown = function(e) {
    var evt = e || window.event;
    switch (evt.keyCode) {
        case 37: { // left arrow key
            window.location = URL_FOR_NEXT_PAGE;
        }
        case 39: { // right arrow key
            window.location = URL_FOR_PREV_PAGE;
        }
    }
    return document.defaultAction; // might not be needed
    // (I use jQuery which makes a lot of this stuff easier)
}; // keyDown()
 
// I dunno where you'd put this bit - <body onload="..."> maybe?
document.onkeydown = keyDown;
 
Caer
0/0
 Reply   Quote More 

Reply to All    
 

1–8

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats