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
961 Views Asked by Maciej Kravchyk At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in EVENTS
- Stop propagation of javasript/leaflet click event that starts in one element and ends in another
- Detecting click inside and outside of the listening component in Angular
- How to use mocha unit test chokidar watch events
- writing event_management in unity
- Where to put event handler method of an inherited class in C++ Builder?
- Event_date reference in CTE
- WinForms, event unable to subscribe from a custom class
- How to intercept a request made by a form submit in JavaScript?
- Communicating from Parent to Child in Blazor
- How to Customize Sitecore Copy operation
- grand parent is handling custom event emitted instead of parent in Angular 17
- jquery not capturing all input value changes
- Is there a way to force the focus on a determined window tab?
- How to watch user browsing activity from a background service?
- Trigger Once in React native
Related Questions in KEYBOARD
- On iOS, the keyboard does not offer a 6-character SMS code
- Using javaFx, how to distinguish between return-key and enter-key on the numpad?
- Way to adding emoji to textarea with keyboard, other than copy/paste
- Win32api send message and Pydirectinput and Powertoy (Keyboard Manager ) Not working when open the application
- Keyboard not appearing when connecting smart card reader to iPhones with type-c port. i.e. iPhone 15/ 15 pro
- Xamarin android emulate usb PC Keyboard
- Pygame response to superfast human key presses?
- Why am I getting keyboard letter repeats with Chrome and not Firefox?
- python keyboard libary problem with writhing too many characters
- Wordpress keyboard navigation
- is on keyboard one side alt is more prominent than other side while using them in shortcut keys
- Preserving TextField Input After Keyboard Dismissal in Flutter
- combine KeyCode pressed and modifiers to get final KeyCode
- Shadcn Drawer component with Inputs on mobile, keyboard hides inputs or shows a blank space hiding them
- Create an onscreen swipe keyboard for Mac
Related Questions in DOM-EVENTS
- How to listen for LightDOM Label "FOR=" events via ShadowDOM Custom Element
- Removing the beforeunload event does not work in React
- event handling for overlapping polygons in google maps
- EventListener is not being added to button elements
- Why is the blur event listener fired twice for the same element with contenteditable in this case?
- Popover API: Event bubbling not working on beforetoggle event?
- An HTML Link Element ("a") Refuses to Attach Itself to Event Listener
- "contextmenu" Event interrupts "onmousemove" from executing a function
- handling the cancel of window.onbeforeunload prompt
- How to appendchild() using drag drop with 2 hierarchically equal divs? using Typescript
- ResizeObserver callback is not being fired when rotated device two times
- How to append an element to a specific div - Vanilla JS?
- How to make every subsequent sibling after a button-wrapper disappear and restore their visibility again by pressing this very button?
- brush overlaps events on other elements
- Rotating chevron in accordion in javascript
Related Questions in KEYDOWN
- I have some picture box and I don't want my main character to touch it like to stop moving
- Trouble with 'keydown' Event in Chrome Extension: Capturing Backspace Action
- RadzenTemplateForm keydown event not working in Chrome and Edge
- Disabling Cargo Collective Navigation Shortcuts
- arrowdown & arrowup key is not working using mat-table in angular
- WPF - KeyDown Event not working with Enter-Key
- How to determine the position of the cursor (caret position) in keypress or keydown event in Angular @HostListener
- Why does the combobox using the keyboard up & down arrows not reflect the textbox in vb.net
- why do I have to press escape on the keyboard twice in vb.net
- KeyboardEvent: detect that a key has a printed representation
- eventListener callback function for keydown triggered twice
- Visual Studio 2019, windows form application
- KeyDown removes input from my TextBox, how to stop this?
- Use 2 keycodes to return event
- How to detect and map many keys being pressed at once
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 # Hahtags
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.