Is it possible to check the status of Scroll Lock, Num Lock and Caps Lock on page load of a web page? I've found ways to check after a keypress using JavaScript, but that's not what I'm asking.
Check Scroll Lock, Num Lock & Caps Lock in JavaScript on Page Load
5.8k views Asked by JustBeingHelpful At
2
There are 2 answers
2
thebiss
On
IN 2019, this is now possible:
var x = event.getModifierState("ScrollLock");
Source: https://www.w3schools.com/jsref/event_mouse_getmodifierstate.asp
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 PAGELOAD
- delay in page load when moving from client slide page to ssr page in nextjs
- How can I stop slideout on subsequent page load?
- Calling a stored procedure on page-load in ASP.NET webforms using VS 2019
- Page not opening but URL is entered in browser in Selenium Java with Cucumber Automation
- Setting a component's variable to localStorage / global variable value on the initial render
- Website flashing for a few frames when navigating between subpages while logged in wordpress
- How to disable css transition load with given script
- How to start sound after page load and change by click function
- Selenium unable to stop page loading
- Disable button if dropdownlist is null
- React Pages Load white page
- Redirecting to a content page in ASP.NET C# but page_load is fired multiple times with different urls including JS
- Why my element undefined in code but defined if I run the code in console js?
- Performance of page load with multiple scripts and HTTP multiplexing
- Yii2 Page doesn't always load content properly until refresh
Related Questions in CAPSLOCK
- Ubuntu GDK C++ how to get the code of a key using CAPSLOCK
- Weird blinking of lights when trying to run the OWASPBWAP with one core count on laptop
- Running two codes at the same time
- Unable to check whether Capslock is on or off in VB.Net
- Caps Lock key always on when pressed in Linux
- getModifierState() not working on dispatched Event
- Slash appears at the cursor insertion point when keyboard shortcut is used
- I need help on making a touch screen keyboard for an application that only uses touch screen. I am specifically having problems with shift and caps
- How can I intercept and block the caps lock toggle event globally, leaving other events intact?
- how to show caps lock is on error message when we press capslock key?
- Detect caps lock on/off using JavaScript
- AHK script: pressing CapsLock to toggle CapsLock + Suspend
- How do you check if CapsLock is initially on, without event listeners?
- Is it possible to control capslock light without actual capslocking?
- How to check the CapsLock status in Assembly
Related Questions in NUM-LOCK
- Turn On and Off Numlock Key using C# (.Net Framework 4.7)
- Basic Excel VBA turns number lock off, I've no idea why
- How do I manually toggle the NumLock Key with C# in WPF?
- Excel VBA - make sure Numlock is always ON
- Why doesn't Shift + Numlock work, even though there is +NumLock::NumLock?
- Excel VBA - SendKeys "{F2}" - keeps toggling num-lock
- Num Lock on, but the Num Lock LED off
- Toggle NUMLOCK / CAPSLOCK / SCROLLLOCK while the workstation is locked?
- Why does a USB Numeric Keypad generating two events under Mac OS X when NumLock is on?
- preventDefault() action that works on numlock key 144 so that numberpad can still be used for shortcuts
- Constant update of the form's data
- UWP - How to check NumLock and CapsLock status?
- Why is numlock off by default?
- Send Keys is Disabling NumLock
- Numlock key pad not working vb.net textbox?
Related Questions in SCROLL-LOCK
- How to scroll lock a Django HTML Web Page
- How to create a ref to child component, store it in context and pass it to a sibling in React with Material UI
- Add scroll-lock button to JScrollBar
- Performance enhancement of this one line of Javascript code
- Scroll doesnt locks with overflow: hidden
- Toggle NUMLOCK / CAPSLOCK / SCROLLLOCK while the workstation is locked?
- Toggle Scroll Lock on or off
- Page Scroll Effects - VelocityJS - (Page Anchors with Data-hijacking enabled)
- Vim-like movement in any program by using Scroll-Lock with letter keys
- TableView cell stop scrolling on cell
- How to scroll lock a Jface tableviewer?
- Check Scroll Lock, Num Lock & Caps Lock in JavaScript on Page Load
- Hijack page scrolling like Google Plus?
- Google Plus & Javascript - Disable scrolling when choosing circles?
- Scroll lock bug in Visual Studio 2010
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?
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)
No, you can't get system state from javascript. You will need them to type something and then analyze the input. Probably not what you wanted to hear =/