Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Alt + left/right arrow keys and Alt + printscreen no longer show the …
Browse files Browse the repository at this point in the history
…menu (windows only)

Properly fixes #5775
Fixes #7566

Auditors: @srirambv, @jonathansampson
  • Loading branch information
bsclifton committed Mar 14, 2017
1 parent ae1d419 commit 981249a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/common/constants/keyCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const KeyCodes = {
F12: 123,
NUMPAD_PLUS: 107,
NUMPAD_MINUS: 109,
TAB: 9
TAB: 9,
PRINT_SCREEN: 44
}

module.exports = KeyCodes
6 changes: 6 additions & 0 deletions js/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ class Main extends ImmutableComponent {
document.addEventListener('keyup', (e) => {
const customTitlebar = this.customTitlebar
switch (e.which) {
case keyCodes.LEFT:
case keyCodes.RIGHT:
case keyCodes.PRINT_SCREEN:
// these keys don't register key down when pressed in combination w/ ALT
this.lastKeyPressed = e.which
break
case keyCodes.ALT:
/*
Only show/hide the menu if:
Expand Down

0 comments on commit 981249a

Please sign in to comment.