use shiftkey

pull/5370/head
filip mertens 4 years ago committed by ioedeveloper
parent 25ee25b351
commit 010e192b0b
  1. 4
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx

@ -228,7 +228,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
useEffect(() => { useEffect(() => {
const keyPressHandler = (e: KeyboardEvent) => { const keyPressHandler = (e: KeyboardEvent) => {
if (e.key === 'Shift') { if (e.shiftKey) {
setState(prevState => { setState(prevState => {
return { ...prevState, ctrlKey: true } return { ...prevState, ctrlKey: true }
}) })
@ -236,7 +236,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
} }
const keyUpHandler = (e: KeyboardEvent) => { const keyUpHandler = (e: KeyboardEvent) => {
if (e.key === 'Shift') { if (!e.shiftKey) {
setState(prevState => { setState(prevState => {
return { ...prevState, ctrlKey: false } return { ...prevState, ctrlKey: false }
}) })

Loading…
Cancel
Save