![]() ![]() The editor element is recognised by the wmd-input CSS class, not by element ID.This ensures it will work even on editor elements not yet present on the page, allowing the script to run even before the page has finished loading ( document-start) and avoiding a gap when the editor is usable with shortcuts not disabled yet. The event handler is attached to the document node in the capturing phase, not to the textarea node itself.Improvements relative to Rob W’s version: ![]() If (ev.ctrlKey || ev.metaKey || ev.altKey)ĭocument.addEventListener('keydown', ignore, true) ĭocument.addEventListener('keypress', ignore, true) ĭocument.addEventListener('keyup', ignore, true) Until that solution exists, the answer to this question is "no".īookmarklet: javascript:(function(a,p)\.stackexchange\.com\// Think about it this way: If a user had asked "How do I change this shortcut?" and one of the responses was "Here's a Linux kernel patch I wrote for you," would you accept that as an answer? I'd upvote it ( thanks for the effort!), but I wouldn't accept it.Ī proper solution to the OP's problem would be a built-in SE preference to disable these frustrating hotkey settings permanently. Furthermore, such solutions will likely be brittle (not future-proof). Even most developers - let alone ordinary Stack Exchange users - are not aware of such options, much less how to install and use them (and evaluate their security risk, etc.). ![]() They offer creative workarounds, and I appreciate the thought people put into coming up with them.īut hacking your browser via "user scripts" or "bookmarklets" isn't really what's being asked for here. I do appreciate the other answers suggested here. The correct answer to the above yes/no question is "no". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |