
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@grandchef/vue-keybindings
Advanced tools
Keyboard Shortcuts registration and Keybindings management
yarn add @grandchef/vue-keybindings
or
npm install @grandchef/vue-keybindings --save
import VueKeybindings from '@grandchef/vue-keybindings'
Vue.use(VueKeybindings, {
alias: {
cancel: ['esc'],
reload: ['alt', 'f5'],
delete: 'shift+del'
}
})
var vm = new Vue({
shortcuts: {
keydown: function (event) {
console.log('key ', event, 'pressed')
return false // stop alias calling
},
cancel: function () {
console.log('escape key pressed')
return false // stop propagation
},
customBinding: function (data) {
console.log('this method was fired by some call to: vm.$shortcut.emit("customBinding", data)')
}
},
methods: {
clickButton: function (val) {
this.$shortcut.emit('customBinding', val)
}
}
})
Create a new listener
this.$options.shortcuts.commandName = () => {
console.log('do some action')
}
Remove existing listener
delete this.$options.shortcuts.commandName;
Create a new keybinding
this.$shortcut.add('command-name', 'ctrl+f6')
// or
this.$shortcut.add('commandName', ['ctrl', 'f6'])
Remove existing keybinding
this.$shortcut.remove('command-name', 'ctrl+f6')
// unbind all actions for this shortcut
this.$shortcut.unbind(['ctrl', 'f6'])
// clear all keybindings
this.$shortcut.clear()
FAQs
Keyboard Shortcuts registration and Keybindings management
The npm package @grandchef/vue-keybindings receives a total of 0 weekly downloads. As such, @grandchef/vue-keybindings popularity was classified as not popular.
We found that @grandchef/vue-keybindings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.