¡@

Home 

2014/10/16 ¤W¤È 12:04:28

jquery Programming Glossary: isctrl

How to use custom keyboard shortcuts within CKeditor with jQuery?

http://stackoverflow.com/questions/3245797/how-to-use-custom-keyboard-shortcuts-within-ckeditor-with-jquery

looking at the CKeditor support forums and after some coding I arrived to the following solution I use jQuery var isCtrl false '#your_textarea_id' .ckeditor function editor.on 'contentDom' function evt editor.document.on 'keyup' function event.. function editor.on 'contentDom' function evt editor.document.on 'keyup' function event if event.data. .keyCode 17 isCtrl false editor.document.on 'keydown' function event if event.data. .keyCode 17 isCtrl true if event.data. .keyCode 83 isCtrl.. if event.data. .keyCode 17 isCtrl false editor.document.on 'keydown' function event if event.data. .keyCode 17 isCtrl true if event.data. .keyCode 83 isCtrl true The preventDefault call prevents the browser's save popup to appear. The..

jquery: keypress, ctrl+c (or some combo like that)

http://stackoverflow.com/questions/4604057/jquery-keypress-ctrlc-or-some-combo-like-that

combo like that I'm trying to create shortcuts on the website i'm making. I know I can do it this way if e.which 17 isCtrl true if e.which 83 isCtrl true alert 'CTRL S COMBO WAS PRESSED ' run code for CTRL S ie save e.preventDefault But the example.. to create shortcuts on the website i'm making. I know I can do it this way if e.which 17 isCtrl true if e.which 83 isCtrl true alert 'CTRL S COMBO WAS PRESSED ' run code for CTRL S ie save e.preventDefault But the example below is easier and..