1.0.29 • Published 2 years ago

@gomarky/window-shortcut v1.0.29

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@gomarky/window-shortcut


:cd: Installation

  • via npm: npm install @gomarky/window-shortcut --save
  • via yarn: yarn add @gomarky/window-shortcut

:notebook: List of available shortcuts

  // For all platform
  'Ctrl+A',
  'Ctrl+C',
  'Ctrl+V',
  'Ctrl+Z',
  'Ctrl+Shift+Z',
  'Shift+Tab',
  'Tab',
      
  // For MacOS
  'Meta+A',
  'Meta+C', 
  'Meta+V', 
  'Meta+Z', 
  'Meta+Shift+Z'

:rocket: Usage

import windowShortcut from '@gomarky/window-shortcut'

windowShortcut.registerShortcut('Ctrl+A', () => {
  console.log('Ctrl+A pressed');
})

windowShortcut.registerShortcut('Shift+B', () => {
  console.log('Shift+B pressed');
});

:warning:

⚠️ By default, at every shortcut execute, we prevent default behaviour of browser, by calling event.preventDefault()

⚠️ Note: Available only on desktop devices. Mobile browsers/devices is not support. (Due they don't have keyboards =))

🔓 License

See the LICENSE file for license rights and limitations (MIT).

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.25

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago