Fmdpa Posted March 7, 2011 Share Posted March 7, 2011 Is it possible to detect key combinations (like Ctrl + B ) and trigger a function from it? Link to comment Share on other sites More sharing options...
jeffman Posted March 7, 2011 Share Posted March 7, 2011 Yup. altKey, ctrlKey, metaKey, shiftKey. Link to comment Share on other sites More sharing options...
Fmdpa Posted March 7, 2011 Author Share Posted March 7, 2011 Cool, thanks! Link to comment Share on other sites More sharing options...
Fmdpa Posted March 8, 2011 Author Share Posted March 8, 2011 The JS key combination worked just great...that is, until the Bookmarks toolbar opened. I doubt there is a way to override browser shortcuts, but just to be sure, is there? Link to comment Share on other sites More sharing options...
Ingolme Posted March 8, 2011 Share Posted March 8, 2011 Hmm, probably not. Though you can see if the preventDefault() and stopPropagation() methods would work. Link to comment Share on other sites More sharing options...
Fmdpa Posted March 8, 2011 Author Share Posted March 8, 2011 Neither function worked, but return false worked for preventing the default action in a couple of the shortcuts. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.