Can we disable keyboard key (Ctrl+A/Ctrl+C) with CSS, so that nobody can use select all shortcut using keyboard in my website?
To lock your keyboard, press Ctrl+Alt+L. The Keyboard Locker icon changes to indicate that the keyboard is locked. Almost all keyboard input is now disabled, including function keys, Caps Lock, Num Lock, and most special keys on media keyboards.
No, CSS cannot affect the browser's response to the keyboard. JavaScript can, but JavaScript can also be turned off.
In other words: you can't do that, and even if you do then you can't count on it.
Not with CSS, however it's possible using JavaScript if the browser doesn't have the feature disabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With