Improve keyboard shortcut

This commit is contained in:
syuilo 2018-09-18 08:19:45 +09:00
parent 2a4c53c3a4
commit 19c72627fc
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 11 additions and 0 deletions

View File

@ -62,16 +62,27 @@ export default Vue.extend({
computed: {
keymap(): any {
return {
'esc': this.close,
'1': () => this.react('like'),
'numpad 1': () => this.react('like'),
'2': () => this.react('love'),
'numpad 2': () => this.react('love'),
'3': () => this.react('laugh'),
'numpad 3': () => this.react('laugh'),
'4': () => this.react('hmm'),
'numpad 4': () => this.react('hmm'),
'5': () => this.react('surprise'),
'numpad 5': () => this.react('surprise'),
'6': () => this.react('congrats'),
'numpad 6': () => this.react('congrats'),
'7': () => this.react('angry'),
'numpad 7': () => this.react('angry'),
'8': () => this.react('confused'),
'numpad 8': () => this.react('confused'),
'9': () => this.react('rip'),
'numpad 9': () => this.react('rip'),
'0': () => this.react('pudding'),
'numpad 0': () => this.react('pudding'),
};
}
},