Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8624011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:25:13+00:00 2026-06-12T07:25:13+00:00

We are assigning new key codes to an onKeyPress event in IE with this

  • 0

We are assigning new key codes to an onKeyPress event in IE with this code:

window.event.keyCode=65

In IE, this changes the key received by other event handlers in the chain, but this code doesn’t work in chrome. Is there any way to do this?

Example HTML:

<input type="text" name="hotelfloornew" id="hotelfloornew" 
       onkeypress="uPPer();" size="25" />

Corresponding JS:

function uPPer()
{
    switch (window.event.keyCode)
    {       
        case 97:window.event.keyCode=65;break;
        case 98:window.event.keyCode=66;break;  
        case 99:window.event.keyCode=67;break;  
        case 100:window.event.keyCode=68;break;
.
.
.

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:25:15+00:00Added an answer on June 12, 2026 at 7:25 am

    Changing the keyCode property of an event is a grotty hack that only works in old IE. It should be read-only and is in all sensible browsers. Don’t do it.

    If you need to change the effect of a keypress, prevent its default action and do your own replacement action manually. If you want to map typed characters to other characters, you can use code I’ve published before on Stack Overflow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I kept on receiving this error Deprecated: Assigning the return value of new by
I am assigning to an ImageView contacts images using this code: mPhotoView = (ImageView)
for predefined equations,assigning new values to variables do not changes value of equation. how
If I make changes to an existing linq object by assigning a new object
I'm new to PHP so this question seems stupid, but suppose I'm assigning variable
i have a map Map<id,String> map1= new Map<id,String>(); I am assigning values into this
Any way to declare a new variable in F# without assigning a value to
I'm new to OOP. Originally I was defining variables and assigning values to them
When assigning a type casted array to codeigniter's session, I get this error: A
Need some help assigning a mouseover event to display some icons that start out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.