uptick / react-keyed-file-browser

Folder based file browser given a flat keyed list of objects, powered by React.
MIT License
301 stars 144 forks source link

OSX compatible multiple selection #93

Closed mishaschwartz closed 4 years ago

mishaschwartz commented 4 years ago

Version 1.7.0 introduced the ability to select multiple files/folders by clicking multiple rows while simultaneously holding down the ctrl or shift keys (https://github.com/uptick/react-keyed-file-browser/pull/86/).

On OSX this works well for the shift key but does work for the ctrl key. This is because on some browsers (chrome for example), ctrl+click sends a contextmenu event not a mousedown event.

I suggest adding support for detecting the meta key as an alternative to the ctrl key so that osx users can select multiple files using cmd + click instead of ctrl + click.

Summary:

Possible fix: