Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($) {
- var PluginName_KeyCapture = Garnish.Base.extend({
- init: function()
- {
- this.addListener(Garnish.$doc, 'keydown', function(ev)
- {
- if ((ev.metaKey || ev.ctrlKey) && ev.keyCode == 66)
- {
- ev.preventDefault();
- console.log('You hit CTRL + B! Good work.');
- }
- });
- }
- });
- Craft.PluginName_KeyCapture = new PluginName_KeyCapture();
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement