兼容ie6-ie8/Chrome/Firefox
/**
* Ctrl+Key shortcuts
* @param {string} key,etc:'A'
* @param {function} callback:event callback
* @param {array} args:callback's args
*/
$.ctrl = function(key, callback, args){
var isCtrl = false;
$(document).keydown(function(e){
if (e.which === 17)
isCtrl = true;
if (e.which === key.charCodeAt(0) && isCtrl === true) {
callback.apply(this, args);
return false;
}
}).keyup(function(e){
if (e.which === 17)
isCtrl = false;
});
};
分享到:
相关推荐
Ctrl+K Ctrl+S Keyboard Shortcuts Basic editing Ctrl+X Cut line (empty selection) Ctrl+C Copy line (empty selection) Alt+ ↑ / ↓ Move line up/down Shift+Alt + ↓ / ↑ Copy line up/down Ctrl+Shift+K ...
jQuery Shortcuts 是个超轻量级的方法,使用 jQuery 来绑定快捷键(热键)。 标签:jquery
快捷键专家1.0快捷键专家1.0快捷键专家1.0快捷键专家1.0
eclipse快捷键 Keyboard Shortcuts让编程飞起来
安装npm install redux-min-shortcuts带React钩子的示例使用挂钩将Undo / Redo绑定到Ctrl + Z / Ctrl + Y的钩子的示例,用于redux-undo软件包。 所需要的只是使用带有useGlobalShortcuts() -to-action-creators数组...
bottom of the screen Windows Key A Open Action Center Windows Key C Launch Cortana in listening mode to give it voice commands Windows Key I Open Settings Windows Key S Launch Cortana Windows Key Tab ...
In order to truly master JavaScript, you need to learn how to work effectively with the language’s flexible, expressive features and how to avoid its pitfalls. No matter how long you’ve been writing...
Shortcuts JS:一个 Node.js iOS 12 的快捷键创建器
Ctrl + L * Ctrl + N * Ctrl + O * Ctrl + P * Ctrl + PAGEDOWN * Ctrl + PAGEUP * Ctrl + Q * Ctrl + R * Ctrl + S * Ctrl + T * Ctrl + TAB * Ctrl + U * Ctrl + W * Ctrl + Shift + A * Ctrl + Shift + B * Ctrl ...
juniper JUNOS,How to Use Junos Command shortcuts
jQuery.Shortcuts jQuery.Shortcuts 可让您轻松地在任意和易于定义的快捷方式集(组)之间切换。 您甚至可以通过名称空间管理快捷方式组的父项。 依赖关系 这个 jQuery 插件需要加载。 例子 配置 // configure $....
安装了Adobe premiere CS4大师版,但是没有快捷键应用,比如按空格键和回车键都不能实现作品的预览,很不方便。原来在安装目录里少了这个文件夹Keyboard Shortcuts-Adobe pre快捷键
CodeX快捷方式是一个微库,用于在Javascript中调度键盘快捷键。 您不需要外部依赖项。 安装 包可在NPM上获得 npm install @codexteam/shortcuts --save 用法 如果使用Webpack或ES6,则需要模块 const Shortcut = ...
Windows 7快捷键大全 The Complete Windows 7 Shortcuts eBook Whether you have to write anything like a letter or have to calculate numerical data, your keyboard is the main way to enter information into...
键盘+ Clavier +是Windows实用程序,可用于创建涉及几乎所有键(包括Windows键)的键盘快捷方式,以启动程序,编写文本,打开网站,... 您总是启动相同的程序,导航到相同的网站吗? 创建一个简单的快捷方式即可更...
禁用浏览器快捷键 阻止浏览器快捷键工作。 企业领域似乎有抑制浏览器快捷键的需求。我拿到了现有的源代码,但是keyCode看规范比较困难,无法为每个浏览器设置威慑键,所以我自己做了。如果你在工作时间这样做,你...
Shortcut.js 可以让你实现键盘快捷键和应用功能之间的绑定。 一些快捷键定义: Shortcut Event Name j shortcutNextItem k shortcutPrevItem n shortcutNewItem o ...
语言:English (United States) ...要更改快捷方式命令,请转到chrome:// extensions / shortcuts。 查找“简单定义”,然后选择任何可用命令集。 对于任何投诉和疑问,请通过cheitah.ink@gmail.com与我们联系。
JavaScript快捷方式库(jQuery插件)用法添加快捷方式: $.Shortcuts.add({ type: 'down', mask: 'Ctrl+A', handler: function() { debug('Ctrl+A'); }});开始对快捷方式作出React: $.Shortcuts.start();在“另一个...
It is important to know how to extend the power of jQuery with custom methods as it is a fundamental skill for a top jQuery developer. Chapter 13 introduces the jQuery Deferred Object, which was ...