Skip to content

Commit

Permalink
🐛 Fix: shift key function in gallery page
Browse files Browse the repository at this point in the history
  • Loading branch information
Molunerfinn committed Aug 28, 2021
1 parent 58420c8 commit 5895889
Show file tree
Hide file tree
Showing 2 changed files with 608 additions and 191 deletions.
8 changes: 6 additions & 2 deletions src/renderer/pages/Gallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,12 @@ export default class extends Vue {
document.addEventListener('keyup', this.handleDetectShiftKey)
}
handleDetectShiftKey (event: KeyboardEvent) {
if (event.keyCode === 16) {
this.isShiftKeyPress = !this.isShiftKeyPress
if (event.key === 'Shift') {
if (event.type === 'keydown') {
this.isShiftKeyPress = true
} else if (event.type === 'keyup') {
this.isShiftKeyPress = false
}
}
}
get filterList () {
Expand Down
Loading

0 comments on commit 5895889

Please sign in to comment.