remove usage of e.which (#1196)
* remove usage of e.which * this comment is no longer necessary
This commit is contained in:
parent
6c5f9ee49b
commit
085847644c
|
@ -14,7 +14,7 @@ export default new class DeveloperMode extends Builtin {
|
|||
}
|
||||
|
||||
debugListener(e) {
|
||||
if (e.which === 119 || e.which == 118) { // F8
|
||||
if (e.key === "F7" || e.key == "F8") {
|
||||
debugger; // eslint-disable-line no-debugger
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
|
|
@ -13,7 +13,7 @@ export default new class DevToolsListener extends Builtin {
|
|||
}
|
||||
|
||||
toggleDevTools(e) {
|
||||
if (e.ctrlKey && e.shiftKey && e.which === 73) { // Ctrl + Shift + I
|
||||
if (e.ctrlKey && e.shiftKey && e.key === "I") {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (this.get(this.collection, this.category, this.id)) IPC.toggleDevTools();
|
||||
|
|
|
@ -15,7 +15,7 @@ export default new class InspectElement extends Builtin {
|
|||
}
|
||||
|
||||
inspectElement(e) {
|
||||
if (e.ctrlKey && e.shiftKey && e.which === 67) { // Ctrl + Shift + C
|
||||
if (e.ctrlKey && e.shiftKey && e.key === "C") { // Ctrl + Shift + C
|
||||
IPC.inspectElement();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ export default class PublicServers extends React.Component {
|
|||
}
|
||||
|
||||
searchKeyDown(e) {
|
||||
if (this.state.loading || e.which !== 13) return;
|
||||
if (this.state.loading || e.key !== "Enter") return;
|
||||
const term = e.target.value;
|
||||
if (this.state.tab == "Featured" || this.state.tab == "Popular") this.setState({tab: "All"}, () => this.search(term));
|
||||
else this.search(term);
|
||||
|
|
Loading…
Reference in New Issue