Jump to content

Javascript Rkey


hsncorrosion

Recommended Posts

I have no idea how to find the rkeys to use up down left and right

Any ideas? I've looked online and could not find it

currently its set to WASD

<script type="text/javascript">

<!--

function getkey(e)

{

if (window.event)

  return window.event.keyCode;

else if (e)

  return e.which;

else

  return null;

}

function redir(key)

{

        var rkey = getkey(key);

        if(rkey == 119)

        {

                document.location.href="$move_up";

        }

        if(rkey == 115)

        {

                document.location.href="$move_down";

        }

        if(rkey == 97)

        {

                document.location.href="$move_left";

        }

        if(rkey == 100)

        {

                document.location.href="$move_right";

        }

}

//-->

</script>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...