我想模拟一下,如果在使用JS的web应用程序上运行MAC,按下Command + Shift + esc组合键可以停止屏幕录制
发布于 2020-01-29 02:31:59
您可以向文档中添加keydown事件侦听器。
document.addEventListener('keydown', function (event) {
// Check that the key that is down is the “Escape” key
// And that the meta key is down (cmd on Mac, the windows key on Windows)
// And that the shift key is also down
if (event.key === 'Escape' && event.metaKey && event.shiftKey) {
// Do things!
}
});https://stackoverflow.com/questions/59954525
复制相似问题