diff --git a/mousetrap/mousetrap-global-bind-tests.ts b/mousetrap/mousetrap-global-bind-tests.ts
index 92374d862..79620e24c 100644
--- a/mousetrap/mousetrap-global-bind-tests.ts
+++ b/mousetrap/mousetrap-global-bind-tests.ts
@@ -1,14 +1,14 @@
///
-Mousetrap.globalBind('4', function() { console.log('4'); });
-Mousetrap.globalBind("?", function() { console.log('show shortcuts!'); });
-Mousetrap.globalBind('esc', function() { console.log('escape'); }, 'keyup');
+Mousetrap.bindGlobal('4', function() { console.log('4'); });
+Mousetrap.bindGlobal("?", function() { console.log('show shortcuts!'); });
+Mousetrap.bindGlobal('esc', function() { console.log('escape'); }, 'keyup');
// combinations
-Mousetrap.globalBind('command+shift+K', function() { console.log('command shift k'); });
+Mousetrap.bindGlobal('command+shift+K', function() { console.log('command shift k'); });
// map multiple combinations to the same callback
-Mousetrap.globalBind(['command+k', 'ctrl+k'], function() {
+Mousetrap.bindGlobal(['command+k', 'ctrl+k'], function() {
console.log('command k or control k');
// return false to prevent default browser behavior
@@ -17,15 +17,15 @@ Mousetrap.globalBind(['command+k', 'ctrl+k'], function() {
});
// gmail style sequences
-Mousetrap.globalBind('g i', function() { console.log('go to inbox'); });
-Mousetrap.globalBind('* a', function() { console.log('select all'); });
+Mousetrap.bindGlobal('g i', function() { console.log('go to inbox'); });
+Mousetrap.bindGlobal('* a', function() { console.log('select all'); });
// konami code!
-Mousetrap.globalBind('up up down down left right left right b a enter', function() {
+Mousetrap.bindGlobal('up up down down left right left right b a enter', function() {
console.log('konami code');
});
-Mousetrap.globalBind(['ctrl+s', 'meta+s'], (e, combo) => {
+Mousetrap.bindGlobal(['ctrl+s', 'meta+s'], (e, combo) => {
if (e.preventDefault) {
e.preventDefault();
} else {
diff --git a/mousetrap/mousetrap-global-bind.d.ts b/mousetrap/mousetrap-global-bind.d.ts
index ecfdd2ff2..5e56d2107 100644
--- a/mousetrap/mousetrap-global-bind.d.ts
+++ b/mousetrap/mousetrap-global-bind.d.ts
@@ -6,6 +6,6 @@
///
interface MousetrapStatic {
- globalBind(keys: string, callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void;
- globalBind(keyArray: string[], callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void;
+ bindGlobal(keys: string, callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void;
+ bindGlobal(keyArray: string[], callback: (e: ExtendedKeyboardEvent, combo: string) => any, action?: string): void;
}