I noticed that when you press and hold a letter key like A the keydown event is fired continuously as long as you hold it. However when you press and hold down shift, the event is fired only once. I want to base my application logic on that observation, but I don't know if it is a standard behavior in every browser. Can anyone confirm?
Keydown event behavior when holding down Shift key
956 Views Asked by Maciej Kravchyk At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in EVENTS
- OpenLayer 3: Map pointer up event can not be triggered when the map created on overlay
- Angular scroll directive
- Setting multiple events in one ext.net button
- Detect if Application was suspended in OnNavigatedFrom for Windows Phone 8
- When in click a radio button, it scroll to the top. How to prenvent that?
- Event subscribed but null in child class (after threads initialize)
- How to get results each sec from "perf stat -d sleep 1000"
- How to register event for TextBox end editing
- Stop the installshield installation if a file is not found in vb.net
- How to capture the next event based on a condition
- Flask server to notify webclient when changes occur
- Google analytics event tracking, retrieve results
- What is the correct way to code event handlers for serializable model objects?
- Android version of NSNotificationCenter (event binding)
- Center JoptionPaneMessageDialog in parent element of the source element that generated the event
Related Questions in KEYBOARD
- Layout not shifting up when keyboard is open
- Unity3d - Input.GetKey returns true more than once
- Android: how to prevent jumping/flashing of views when trying to replace keyboard with a view
- Objective c keyboard opens unwillingly
- How to add scrollview to keyboardView in android
- C# - SendInput() - Hold Key Down?
- How to change keyboard language programmatically in windows 8
- Dismiss the Keyboard in Swift via hitTest
- How to convert VK scan codes to appropriate character for language selected
- How to get keystrokes with java outside of frames
- del key on a PC keyboard with MAC mini
- How to find which key is pressed, not which character it will be?
- Android soft keyboard in Chinese languages
- Is this Possible to add Keyboard Predictive option in UISearchBar keyboard
- Xcode Changing Keyboard
Related Questions in DOM-EVENTS
- How to get a button's ID when clicked in Windows 8 apps?
- Google maps API additional events
- How to bind event to appended element in jQuery
- Dynamically added event handler disables the previous one in JavaScript
- Plain JavaScript prevent eventListener being executed twice
- Why isn't my Google Tag Manager event listener being installed?
- Separate click event from focus event in Angular.js
- Create a custom event for a Polymer Custom-Element
- IndexedDB: Can you manually initiate a version change transaction?
- Namespace vanilla JavaScript events like in jQuery
- Trigger JavaScript action on click?
- Touch event doesn't alert latitude
- onended audio event firing without playing the audio
- What WheelEvent.deltaZ refers to?
- Basic Calculator - event binding using pure JavaScript
Related Questions in KEYDOWN
- WPF how to manage ENTER hit on TextBox for messaging purpose
- C# - SendInput() - Hold Key Down?
- how to fire a keydown or keypress event
- JavaScript Press Enter Key Twice With Different Actions After Each Keypress
- AngularJS Press Key Twice With Different Actions After Each Keypress
- Multiple keys with WPF KeyDown event
- How can I modify the function keydown in javascript to not allow a decimal point?
- How to open new form when Enter as Tab?
- how to prevent keydown e.alt from opening an irrelevant drop down menu?
- jquery keydown preventDefault not working on Android
- Actions Class in Selenium Webdriver
- Method cannot handle event "KeyDown because they do not have a compatible signature"
- In the LibGDX InputProcessor, Does every KeyDown() have a corresponding KeyUp()?
- Keydown event behavior when holding down Shift key
- keydown not firing on div
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Unfortunately, this is not a standard behaviour that you can rely on. I did a quick test on a few browsers I had installed (IE Edge, IE 11, Chrome 55, all on a windows machine), where all 3 browsers auto-repeated the keydown event for both letter keys (like
A), and modifier keys (likeshift), contrary to what you state your browser does.Consistent handling of keyboard events has always been difficult across different browsers, as documented by Jan Wolter here and Peter-Paul Koch here. Wolter writes about auto-repeat:
then Wolter goes on to list various exceptions to this.