Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
[Ignore Keyboard Actions With Modifiers #60] ignore left/right arrow …
Browse files Browse the repository at this point in the history
…action triggers if user is holding down alt key
  • Loading branch information
chris-chao committed Aug 21, 2018
1 parent 8baa8ec commit f617da4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/KeyboardInteraction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ class KeyboardInteractionInner extends Component<Props> {
switch (e.code) {
case 'ArrowLeft':
case 'KeyH':
this.props.previousSong();
if (!e.altKey){
this.props.previousSong();
}
break;

case 'ArrowRight':
case 'KeyL':
this.props.nextSong();
if (!e.altKey){
this.props.nextSong();
}
break;

case 'Space':
Expand Down

0 comments on commit f617da4

Please sign in to comment.