Open Ionshard opened 3 years ago
Putting on my developer hat for a minute. I think this might be pretty easy to do. Maybe I'll try to get the code running locally and see if I can help out if this is an acceptable solution.
Looking at the papermerge JS code. In the browse.js view you already have a really useful select_node_by_cid
that you call when the checkbox is clicked and in the on_node_clicked_handler you are getting the cid to open the node anyways.
Looks like it should be possible to grab the state of the Control Key from the mouse event and just call the select_node_by_cid
function instead.
Looks like there may be some additional handling to handle the UI updates that are in the on_checkbox_clicked
that would need to be refactored.
If I am not crazy and missing something obvious and you are open to contributions let me know and I can give it a shot. Otherwise you probably don't need the help to do it yourself and can ignore everything I said above 😝
@Ionshard, yes, indeed, it is not that hard to add. However, please note that I am refactoring most of the code out of papermerge JS into smaller npm packages. The part responsible for selection is now in commander-js.
Currently to select files in Papermerge you either need to select the checkbox on a file or use the rectangle selection. This can make it difficult to select many files that are not all in the same location.
When using a file editor in any major OS they support using the Control key as a way to add to the selection.
Thus with Papermerge I think it would be nice if it supported this as well. If I hold down the control key and click a document, rather than navigating to the document itself it would be nice to just select the document instead.
I understand that on the web that Ctrl+Click can also mean to open up in a new tab. However testing on my local papermerge installation it appears that Ctrl+Click doesn't currently open a new tab. So this request wouldn't change any existing behavior with the application.