adjustments

pull/5062/head
Joseph Izang 4 months ago committed by Aniket
parent c4c1b764a8
commit 3724a33296
  1. 17
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx

@ -266,49 +266,48 @@ export const FileExplorer = (props: FileExplorerProps) => {
if ((window as any).navigator.platform === 'MacIntel') { if ((window as any).navigator.platform === 'MacIntel') {
CopyComboHandler = async (eve: KeyboardEvent) => { CopyComboHandler = async (eve: KeyboardEvent) => {
if (eve.metaKey && eve.code === 'KeyC') { if (eve.metaKey && eve.code === 'KeyC') {
feWindow._paq.push(['trackEvent', 'fileExplorer', 'f2ToRename', 'RenamePath'])
await performCopy() await performCopy()
feWindow._paq.push(['trackEvent', 'fileExplorer', 'f2ToRename', 'RenamePath'])
return return
} }
} }
CutHandler = async (eve: KeyboardEvent) => { CutHandler = async (eve: KeyboardEvent) => {
if (eve.metaKey && eve.code === 'KeyX') { if (eve.metaKey && eve.code === 'KeyX') {
feWindow._paq.push(['trackEvent', 'fileExplorer', 'f2ToRename', 'RenamePath'])
await performCut() await performCut()
feWindow._paq.push(['trackEvent', 'fileExplorer', 'f2ToRename', 'RenamePath'])
return return
} }
} }
pasteHandler = async (eve: KeyboardEvent) => { pasteHandler = async (eve: KeyboardEvent) => {
if (eve.metaKey && eve.code === 'KeyV') { if (eve.metaKey && eve.code === 'KeyV') {
feWindow._paq.push(['trackEvent', 'fileExplorer', 'metaVToPaste', 'PasteCopiedContent'])
performPaste() performPaste()
feWindow._paq.push(['trackEvent', 'fileExplorer', 'metaVToPaste', 'PasteCopiedContent'])
return return
} }
} }
} } else {
if ((window as any).navigator.platform === 'Linux x86_64' || (window as any).navigator.platform === 'Win32') {
pcCopyHandler = async (eve: KeyboardEvent) => { pcCopyHandler = async (eve: KeyboardEvent) => {
if (eve.ctrlKey && (eve.key === 'c' || eve.key === 'C')) { if (eve.ctrlKey && eve.key === 'c') {
feWindow._paq.push(['trackEvent', 'fileExplorer', 'CtrlCToCopy', 'CopyPath'])
await performCopy() await performCopy()
feWindow._paq.push(['trackEvent', 'fileExplorer', 'CtrlCToCopy', 'CopyPath'])
return return
} }
} }
pcCutHandler = async (eve: KeyboardEvent) => { pcCutHandler = async (eve: KeyboardEvent) => {
if (eve.ctrlKey && eve.code === 'KeyX') { if (eve.ctrlKey && eve.code === 'KeyX') {
feWindow._paq.push(['trackEvent', 'fileExplorer', 'CtrlXToCut', 'CutPath'])
await performCut() await performCut()
feWindow._paq.push(['trackEvent', 'fileExplorer', 'CtrlXToCut', 'CutPath'])
return return
} }
} }
pcPasteHandler = async (eve: KeyboardEvent) => { pcPasteHandler = async (eve: KeyboardEvent) => {
if (eve.key === 'Control' && eve.code === 'KeyV') { if (eve.key === 'Control' && eve.code === 'KeyV') {
feWindow._paq.push(['trackEvent', 'fileExplorer', 'ctrlVToPaste', 'PasteCopiedContent'])
performPaste() performPaste()
feWindow._paq.push(['trackEvent', 'fileExplorer', 'ctrlVToPaste', 'PasteCopiedContent'])
return return
} }
} }

Loading…
Cancel
Save