Shortcut for showing hidden files in FileBrowserComponent

Hi Jules,

What about adding this function in FileBrowserComponent:

bool FileBrowserComponent::keyPressed(const KeyPress &key) { if (key.getModifiers().isCommandDown() && key.getKeyCode() == 'H' || key.getKeyCode() == 'h') { fileList->setIgnoresHiddenFiles (!fileList->getIgnoresHiddenFiles()); fileList->refresh(); return true; } return false; }

That way the “ctrl-H” shortcut that is quite “standard” on Linux for toggling the display of hidden files works, and other OS get it for free also !

(I was really pleased to see that this functionality could be added with so few lines of code !)

Good suggestion, though on the mac command+H hides the active app, so I think it’d need to be linux-only (or linux + windows)

Right, I forgot this one. Maybe using isControlDown instead of isCommandDown is the simplest solution ?

good spot !
also when you are at it, you might consider my changes for enabling the multi file selections in the FileBrowserComponent (plus using platform dialogs using zenity on linux when available):