Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

use local shortcuts for dev tools and plugins #500

Merged
merged 1 commit into from
Jan 17, 2017
Merged

Conversation

avahowell
Copy link
Contributor

@avahowell avahowell commented Jan 12, 2017

This PR prevents the UI's shortcuts (Ctrl-Shift-L and Ctrl-Shift-P) from being persistently registered even when the UI is not focused. We still want to preserve the semantics of the globalShortcut api, namely parsing Ctrl+Shfit+x type shortcut values and being able to receive shortcut events regardless of what DOM element is focused, so this code simply unregisters shortcuts when focus is lost and re-registers them when focus is regained, instead of using the JS window.onkeydown/keyup api.

Fixes #499.

@lukechampine
Copy link
Member

worth reading the discussion of this approach here: electron/electron#1334 (comment)

@DavidVorick
Copy link
Member

@lukechampine do you recommend that we not merge this PR then?

@lukechampine
Copy link
Member

It should be merged as long as it doesn't do anything wonky. Seems ok though.

@lukechampine lukechampine merged commit f1d6abc into master Jan 17, 2017
@avahowell avahowell deleted the global-shortcuts branch February 17, 2017 01:35
@avahowell avahowell restored the global-shortcuts branch February 17, 2017 01:35
@avahowell avahowell deleted the global-shortcuts branch February 17, 2017 01:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants