//usage:$(dom).keyman({key:"D",ctrl:true,callback:func});$.fn.keyman = Keyman;function Keyman( opts ){ var CTRL = opts.ctrl||false; var SHIFT = opts.shift||false; var ALT = opts.alt||false; var key = opts.key||null; if(key instanceof String || typeof key=="string"){ key = key.charCodeAt(0); }else if ( !isNaN(key) ){ key = parseInt(key); } var begin = "a".charCodeAt(0); var end = "z".charCodeAt(0); var gap = begin-"A".charCodeAt(0); if(key>=begin && key<=end) key -= gap; if(!key||!opts.callback) return this; this.live("keydown",function(e){ if( CTRL==e.ctrlKey&&SHIFT==e.shiftKey&&key==e.keyCode){ var r = opts.callback(e); if(e.preventDefault) e.preventDefault(); if(e.stopPropagation) e.stopPropagation(); e.cancelBubble = true; e.returnValue = false; e.keyCode = 0; return r; } });}