You can try using keystroke events. On keystroke, alert the user & return false.
Reference :
You can try using keystroke events. On keystroke, alert the user & return false.
Reference :
When I am on IE, when I use tab to move my focus to the link and press CTRL+Shift+Enter, I get the page opened in another tab. I want to restrict this behavior on IE and show the message to user like “not supported”, please suggest me how to achieve this using javascript.
Why are you pressing CTRL and SHIFT?
This is just to restrict the user from opening a new tab when user presses CTRL+Shift+Enter
You can listen for keyup and keydown events, detect when CTRL or SHIFT is pressed or released and keep track of their states (i.e. ctrl-down=true|false). Then on the links you want this behaviour, listen for click and keydown(enter) events and preventDefault() when CTRL or SHIFT is down, then change location to the link’s href.
I suggest you refer this link may give you the idea of how to disable keys using Javascript. Ref: