Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

JavaScript - ALT + Left Cursor

  • 30-04-2007 02:51PM
    #1
    Closed Accounts Posts: 8,478 ✭✭✭


    Doing an internal web app, and I'd like to be able to prevent the Alt + <- combination that mimics usage of the browsers back button. I've successful prevented generic function and control combinations, but can't seem to trap the Alt + cursor event.

    Tips anyone?


Comments

  • Moderators, Politics Moderators, Paid Member Posts: 44,044 Mod ✭✭✭✭Seth Brundle




  • Closed Accounts Posts: 4,943 ✭✭✭Mutant_Fruit


    There is *nothing* more annoying than not being able to hit back to reverse out of a page. That's all i'll say as ya have the links you need now.


  • Closed Accounts Posts: 8,478 ✭✭✭GoneShootin


    What do I care why it's to be done. I'm the developer not the designer. I'm told to do something, so I do it. Life's too short....

    The balls with the ALT key is that it's not trapped (in IE) until onkeyup given it's a modifier key. However the ALT for the + Left arrow combination doesn't fire an event as it's held down in sync with the arrow key. So by the time I can trap the ALT key the browser has already switched pages.

    Anyway thanks for those links. I'll come up with an alternative. Maybe remove the two keys from the keyboard.


Advertisement