// single keycode
const bind = new alt.Utils.Keybind(71, () => {
alt.log('pressed g')
})
// two keycodes (similar to two separate keybinds with the same handler)
const bind = new alt.Utils.Keybind([71, 75], () => {
alt.log('pressed g or h')
})
// What key event to use (keyup or keydown) can be specified explicitly (keyup by default)
const bind = new alt.Utils.Keybind(71, () => {
alt.log('keydown g')
}, 'keydown')
Added
alt.Utils.Keybind
: