Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy entries between databases #927

Closed
fernando-mc opened this issue Sep 7, 2017 · 26 comments
Closed

Copy entries between databases #927

fernando-mc opened this issue Sep 7, 2017 · 26 comments

Comments

@fernando-mc
Copy link

I'm unable to copy entries with drag and drop. Instead the entries are moved from one database to another.

Expected Behavior

I expected to be able to drag entries from one database to another and have the entries copied to the new database and not deleted from the only one.

Current Behavior

It appears these entries are removed from the first database and added to the second.

Possible Solution

Don't have the default remove these entries from an existing database.

Steps to Reproduce (for bugs)

Not sure if this is a bug or expected functionality but here are the reproduction steps:

  1. Open database 1
  2. Open database 2
  3. Drag highlighted entries from database 1 to the tab within the keepassxc window for db 2
  4. Results as described above.

Context

I can't use this feature because I want to copy entries over, not move them.

Debug Info

KeePassXC - 2.2.0
Revision: caa49a8

Libraries:

  • Qt 5.9.0
  • libgcrypt 1.7.7

Operating system: Windows 10 (10.0)
CPU architecture: x86_64
Kernel: winnt 10.0.15063

Enabled extensions:

  • KeePassHTTP
  • Auto-Type
  • YubiKey
@fernando-mc
Copy link
Author

Found a hack for this to avoid dev work if you don't want to prioritize.

Step 1 - Move the entries over as described and save the database they're going to
Step 2 - Move them back to the other DB and close the one you moved them to without saving.

Cheers!

@droidmonkey
Copy link
Member

Supporting right click drag where it presents you with a choice of move, copy, etc would be more elegant. Move on left click drag may not be the desired default option, but it should be doable one way.

@frostasm
Copy link
Contributor

@fernando-mc use the Ctrl modifier to copy instead of move the entry

copy-entry

@fernando-mc
Copy link
Author

@frostasm Holding control while I drag it works! Not sure why the _L is included in that gif though. Thanks!

@frostasm
Copy link
Contributor

@fernando-mc screenkey app distinguishes between the left and right keys, so the "Control_L" should be read as "Left Contol" :)

@magkopian
Copy link
Contributor

magkopian commented Oct 29, 2017

On pretty much any file manager, when a file is being dragged and dropped between two directories that belong to different partitions, the result is that the file is being copied instead of being moved.

Of course KeePassXC is not a file manager, but since its tree like group structure resembles that of a file system, I believe that this would be what the default behavior a user would expect. Drag and drop inside the same database should result to the entry being moved, while to it being copied when the action takes place between databases, at least that's my personal opinion.

@droidmonkey
Copy link
Member

I concur with @magkopian

@cheesedasher
Copy link

cheesedasher commented Aug 18, 2021

Thank you that worked! However with MacOS use left ALT rather than CTRL. Icon will change to a green + symbol.

@Uj947nXmRqV2nRaWshKtHzTvckUUpD

it seems that drag-drop moves entries from one db to another. wasn't it supposed to copy?

@droidmonkey
Copy link
Member

droidmonkey commented Apr 25, 2022

You need to hold CTRL (or ALT on macOS) after dragging and until you drop. Then a copy will be made.

@dmgeurts
Copy link

Pressing cmd/alt on a Mac doesn't seem to work as a modifier to copy instead of move.

@hsudbrock
Copy link

Just in case someone stumbles over this as I did: On a Gnome-based Linux system, I also had to use "Alt" instead of "Ctrl".

@pkoevesdi
Copy link

I have version 2.7.4 on Ubuntu 23.04 and there neither Alt, nor Ctrl, nor Shift nor any combination of them works under Wayland. There I am only able to move, not copy. If I switch over to Xserver, it works with Crl + drop.
So, I'd suggest to reopen this issue.

@droidmonkey
Copy link
Member

That would be a qt bug (qwayland) not our bug.

@pkoevesdi
Copy link

What makes You so sure? Everything else works in Wayland. Is there a similar use case oder test that I can perform to see if that works. I would say, it is somewhere between them, and KeepassXC is supposed to work in wayland, isn't it? So, it should take more action than just say "it's waylands fault, we don't care".

@droidmonkey
Copy link
Member

There are absolutely no code differences on our side between X11 and Wayland, especially as it applies to drag/drop. Qt is responsible for interfacing with Wayland and handles the majority of drag/drop actions. That is why I am so sure.

@pkoevesdi
Copy link

Is there some other drag/drop action on ubuntu or a different software that's supposed to work the same way, that i could countercheck if that works?

@droidmonkey
Copy link
Member

I do not know, you would have to find one that is built on top of Qt and is using the Wayland compositor and not being sneaky and using xwayland.

@droidmonkey
Copy link
Member

@pkoevesdi I just tested this under Wayland in both Flatpak and native builds and it worked fine. Hold down ALT before dragging, keep it held, then drop on a group. A copy is made.

@pkoevesdi
Copy link

Ah, thank You, pressing Alt before was the solution I missed out. Good that we talked, now we have this solution in this thread.

@clonejo
Copy link
Contributor

clonejo commented Nov 26, 2023

Alt does work on Sway (Wayland), but there is no visual indication at all. I recall there was a little plus on the cursor before.

@droidmonkey
Copy link
Member

The cursor change would be a qt or qwayland issue

@codingthat
Copy link

codingthat commented Oct 31, 2024

On systems where it does work, one major downside to the current implementation is that it creates a new history entry with the current date/time. So (especially when done in bulk) the "last modified" field becomes useless. Is there some way to do it without that occurring? Or reverse this effect afterwards? This happens both in "copy" and in "move" mode.

@droidmonkey
Copy link
Member

It is being addressed now actually

@codingthat
Copy link

Thanks, @droidmonkey ! As in, for the next release?

@droidmonkey
Copy link
Member

Possibly #10481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests