Skip to content

使用hotkeys-js实现快捷键

hotkeys-js快捷键

安装:

npm install hotkeys-js --save

使用:

js
import hotkeys from 'hotkeys-js';

hotkeys('f5', function(event, handler){
  // Prevent the default refresh event under WINDOWS system
  event.preventDefault()
  alert('you pressed F5!')
});

如有转载或 CV 的请标注本站原文地址