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

  • Home
  • SEARCH
  • 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 8666953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:51:19+00:00 2026-06-12T17:51:19+00:00

I want to detect when a user’s keyboard actions alter the value of a

  • 0

I want to detect when a user’s keyboard actions alter the value of a text field. It should work consistently across modern browsers.

The JQuery page for the .keypress event says it’s not consistent? Also, it doesn’t work for backspace, delete etc.

I can’t use .keydown as it is because it reacts to shift, alt and arrow keys etc. Also, it doesn’t fire more than once when the user holds down a key and multiple characters are inserted.

Is there a concise method I’m missing? Or should I use .keydown and filter out events that are triggered by arrow keys, shift and so on? My main concern is there will be keys that I’m not aware should be filtered. (I nearly forgot about alt and ctrl, I suppose there could be others) But then how would I detect the key being held down and inserting multiple characters?

As a bonus it would detect changes due to pasting (including right-clicking) but I have the solution to that from here.

  • 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-12T17:51:20+00:00Added an answer on June 12, 2026 at 5:51 pm

    You can bind the ‘input’ event to the textbox. This would fire every time the input changes, so when you paste something (even with right click), delete and type anything.

    $('#myTextbox').on('input', function() {
        // do something
    });
    

    If you use the change handler, this will only fire after the user deselects the input box, which may not be what you want.

    There is an example of both here: http://jsfiddle.net/6bSX6/

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

Sidebar

Related Questions

I want to detect when a user is missing a required module and print
Edited // I want to detect flash support ( not user string agent )
I want to build flash application that can detect the user eyes color and
I want to detect when user clicks a link in iframe and changes the
I want to detect if the user has already installed google chrome rss plugin
I have a WebView and I want to detect when the user clicks a
I have a web page, that i want to detect if the user redirect
I want to detect multi accounts in a browser game: If a user has
Android: guys i want to detect which button is clicked by the user. The
I want to detect, what part of screen is touched, when user shakes iPhone.

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.