From 920f7ca6ff48e75707949a109bec3e943964e2ce Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Tue, 5 Apr 2022 17:10:53 +0530 Subject: [PATCH] compile keyboard shortcut updated --- apps/solidity-compiler/src/app/compiler-api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index ca36cc2cf5..6a5a9cc867 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -328,7 +328,8 @@ export const CompilerApiMixin = (Base) => class extends Base { // ctrl+s or command+s if ((e.metaKey || e.ctrlKey) && !e.shiftKey && e.keyCode === 83 && this.currentFile !== '') { e.preventDefault() - this.compileTabLogic.runCompiler(await this.getAppParameter('hardhat-compilation')) + if(await this.getAppParameter('hardhat-compilation')) this.compileTabLogic.runCompiler('hardhat') + else if(await this.getAppParameter('truffle-compilation')) this.compileTabLogic.runCompiler('truffle') } } window.document.addEventListener('keydown', this.data.eventHandlers.onKeyDown)