I googled the same thing and came up with my own solution. My reason for this question was to disable developer tools on all browsers.
Basically disabling the ctrl and/or shift proved completely useless as shortcut keys can be customised in the browser.
One way i used was to make sure that if a key press was not inside a input/textarea it must be return false/ or a popup or whatever you desire.
How i achieved this, was to load the dom and immediately put focus to the body tag of the page, then run a interval function to check if the focus was not on the body, if not then return the focus to the body tag.
if an input is clicked in the meantime, disable the interval body check and put focus on the input, until enter is pressed or the input loses focus with a onblur function
with this onblur function place the focus back to the body tag..
keeping the focus on the Dom gives one access to all the key presses..
With PWA's now making a debut everywhere makes things even better as now you can force the user into full screen, which automatically gives focus to the dom page/ body tag, which in turn gives one full control over the key press functions.
I am now unable to call developer console on my own pages on any browser and I've tried every way possible, hope this helps someone..