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 7793683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:33:57+00:00 2026-06-01T22:33:57+00:00

I use keydown event in jquery, but the problem it’s stateless for input language.

  • 0

I use keydown event in jquery, but the problem it’s stateless for input language. It’s can’t determine the input is in English language or in Hebrew or Arabic…?
it returns only keycode, and I can’t get character.

Is there any solution??

  • 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-01T22:33:58+00:00Added an answer on June 1, 2026 at 10:33 pm

    To determine the actual character, you should use the keypress event instead of keydown. While keydown provides you with a key code, keypress indicates the character which was entered by the user.

    Another difference is that when the user presses and holds a key, a keydown event is triggered only once, but separate keypress events are triggered for each inserted character.

    Here’s an example of using the keypress event:

    <body>
    <form>
      <input id="target" type="text" />
    </form>
    
    <script src="http://api.jquery.com/scripts/events.js"></script>
    <script>
      $("#target").keypress(function(event) {
        var charCode = event.which; // charCode will contain the code of the character inputted
        var theChar = String.fromCharCode(charCode); // theChar will contain the actual character
      });
    </script>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to get keydown events on a div. I use JQuery keydown. Pretty
Can I merge these in jQuery? I'm using the HotKeys plugin. $(document).bind('keydown', 'n', cycleNoise);
I know that for handling keyboard events in an input field you can use:
I have this being created by my perl script. print qq| \$('textarea[name=category$row[0]]').keydown(function(event) { \$(input[value=$row[0]]).attr('checked',
I was trying to use the event keyDown event in a wpf textbox control
How can I handle the Keyboard.KeyDown event without using code-behind? We are trying to
I'm using javascript/jQuery.. on the keydown of an input[type='text'] I receive a key code.
I want to add a keydown event listener to the document object without JQuery.
I have a regular text-box: <input type=text> I use jQuery to handle key-related events:
I have used keyDown event to manage the input tag value by judge e.keycode,

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.