- Create new file with any name i.e.
script.zsh
#!/bin/zsh
[COMMANDS_HERE]
- Configure permissions
$ chmod 755 script.zsh
script.zsh
#!/bin/zsh
[COMMANDS_HERE]
$ chmod 755 script.zsh
export default function useKeyPress(keys, onPress) { | |
keys = keys.split(' ').map((key) => key.toLowerCase()) | |
const isSingleKey = keys.length === 1 | |
const pressedKeys = useRef([]) | |
const keyIsRequested = (key) => { | |
key = key.toLowerCase() | |
return keys.includes(key) | |
} |