Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@yafh/use-tinykeys
Advanced tools
Readme
Vue composition API for listen keyboard event.
npm install @yafh/use-tinykeys
or usage yarn
yarn add @yafh/use-tinykeys
import { useTinykeys } from '@yafh/use-tinykeys'
import { defineComponent } from 'vue'
export default defineComponent({
setup() {
// 监听单个键盘值
const { enable } = useKeyStroke('Control+s', (event) => {
console.log(event)
})
// 监听多个键盘值
const { enable } = useKeyStroke(
['Control+s', 'Control+Shift+s'],
(event) => {
console.log(event)
}
)
// 同时监听多个键盘事件
const { enable } = useKeyStroke(
'Control+s',
(event) => {
console.log(event)
},
{
eventType: ['keydown', 'keyup'],
}
)
// 分别监听多个键盘事件
const { enable } = useKeyStroke('Control+s', {
keydown: (event) => {
console.log(event)
},
keyup: (event) => {
console.log(event)
},
})
// 针对不同平台监听不同键盘值
const { enable } = useKeyStroke(
{
windows: 'Control+s',
mac: ['Command+s', 'Command+Shift+s'],
},
(event) => {
console.log(event)
}
)
// 更换监听目标
const { enable } = useKeyStroke(
'Control+s',
(event) => {
console.log(event)
},
{
target: document.body,
}
)
},
})
按键 key 说明:
预设键值点击查看
需要监听的DOM元素
监听的事件类型
连键超时时间(毫秒)
在组件不激活时是否仍然监听键盘事件
FAQs
Vue composition API for listen keyboard event.
We found that @yafh/use-tinykeys demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.