fix listenning ctrl key from compile and run

pull/2298/head
yann300 3 years ago committed by GitHub
parent 59ba75bc52
commit c7a7ea73ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/remix-ide/src/app/tabs/compile-and-run.ts

@ -26,8 +26,10 @@ export class CompileAndRun extends Plugin {
super(profile) super(profile)
this.executionListener = async (e) => { this.executionListener = async (e) => {
// ctrl+e or command+e // ctrl+e or command+e
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.keyCode === 83) {
const file = await this.call('fileManager', 'file') const file = await this.call('fileManager', 'file')
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.keyCode === 83 && file !== '') { if (file) {
if (file.endsWith('.sol')) { if (file.endsWith('.sol')) {
e.preventDefault() e.preventDefault()
this.targetFileName = file this.targetFileName = file
@ -41,6 +43,7 @@ export class CompileAndRun extends Plugin {
} }
} }
} }
}
runScriptAfterCompilation (fileName: string) { runScriptAfterCompilation (fileName: string) {
this.targetFileName = fileName this.targetFileName = fileName

Loading…
Cancel
Save