Javascript key event codes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron Gray

    Javascript key event codes

    I am wondering if there is a table of JavaScript event key codes ?

    Thanks in advance,

    Aaron


  • Evertjan.

    #2
    Re: Javascript key event codes

    Aaron Gray wrote on 15 nov 2005 in comp.lang.javas cript:
    [color=blue]
    > I am wondering if there is a table of JavaScript event key codes ?
    >
    > Thanks in advance,
    >[/color]

    usually I make a small local IE-only html-page, with only:

    <div id=z>x</div>
    <input onkeydown='this .value="";z.inn erHTML=event.ke yCode;'>

    or more usefull:

    <input onkeyup='
    z.innerHTML+=th is.value+" = "+
    event.keyCode+" <br>";
    this.value=""'>
    <div id=z></div>

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Javascript key event codes

      Aaron Gray wrote:
      [color=blue]
      > I am wondering if there is a table of JavaScript event key codes ?[/color]

      I do not know. However, I have always found

      <http://www.brain4.de/programmierecke/js/tastatur.php#st art>

      very useful as test case in that regard.


      PointedEars

      Comment

      • Aaron Gray

        #4
        Re: Javascript key event codes

        >> I am wondering if there is a table of JavaScript event key codes ?[color=blue]
        >
        > I do not know. However, I have always found
        >
        > <http://www.brain4.de/programmierecke/js/tastatur.php#st art>
        >
        > very useful as test case in that regard.[/color]

        Great.

        That will do nicely.

        Thanks,

        Aaron


        Comment

        • Aaron Gray

          #5
          Re: Javascript key event codes

          >> I am wondering if there is a table of JavaScript event key codes ?[color=blue][color=green]
          >>
          >> Thanks in advance,
          >>[/color]
          >
          > usually I make a small local IE-only html-page, with only:
          >
          > <div id=z>x</div>
          > <input onkeydown='this .value="";z.inn erHTML=event.ke yCode;'>
          >
          > or more usefull:
          >
          > <input onkeyup='
          > z.innerHTML+=th is.value+" = "+
          > event.keyCode+" <br>";
          > this.value=""'>
          > <div id=z></div>[/color]

          Thanks,

          Aaron


          Comment

          • eralper
            New Member
            • May 2006
            • 5

            #6
            Hi,

            Check the below page for a list of event key codes.
            Also you can check any key by entering it on a textbox and see its key code by a script running on that page.

            Comment

            Working...