Can't delete attachment/note in a collection with del key

It's not possible to delete an attachment/a note from within a collection with the del key. The only solution is Right-click -> "Delete Selected Item from Library"

Steps:
1. Create an item, add an attachment (link, snapshot, copy of file) or a note. Add the item to a collection.
2. Try to delete the note/the attachment with the delete key from "My Library": ok (confirmation dialog, etc.)
3. Go to the relevant collection. Try to delete the note/the attachment with the del key. Nothing happens.

I think it's not the correct behaviour.

Standalone 3.0.14 (and also tested with the master and 3.1 branches and FF 19)

Edit: actually, maybe this is done on purpose to distinguish "remove from collection"/"delete from library" ? (as the 'del' key is used to remove an item from a collection, this would be confusing if it would be used to delete an attachment in this context? But the confirmation dialog would avoid any confusion I think.)
  • Yeah, I could go either way here. It does seem a little odd for the delete key to perform two different actions based on whether a top-level or child item is selected, but I imagine this is something people want to do with some regularity. Feel free to create a ticket for this.
  • A little odd indeed but, as I wrote above, the confirmation dialog is there to avoid any confusion. I'll create a ticket. Thanks for your comment.
  • (I wouldn't put too much faith in a confirmation dialog for communicating anything, but at least it might be a subtle hint that something different is happening.)
  • two different actions based on whether a top-level or child item is selected
    ... I didn't think of that, shift-del then?
  • I don't understand - ctrl+delete already works, adding another shortcut seems confusing.
  • ctrl+delete already works
    Oh yeah, it does. And it's consistent with moving actual items to trash (which I didn't realize until now). I don't think it's a great idea to be changing shortcuts, but IMO shift+del makes more sense for these actions on Windows (shift+del is the shortcut for deleting items without moving them to trash). I think this is also the case on Ubuntu
  • ! You're right...! I didn't know (or forgot - had tried shift+del), thanks.
  • (shift+del is the shortcut for deleting items without moving them to trash). I think this is also the case on Ubuntu
    yes it is - but that's not the same thing, is it? You _are_ moving the item to the trash with ctrl+del
  • edited February 26, 2013
    Right, but since del is associated with removing items from collection rather than moving them to trash (except for the library root), the next step up (which in my mind is shift+del) would be moving them to trash. And bypassing trash is not an option in Zotero (which I don't have any problem with).

    IMO, for consistency (and now that I know ctrl+del exists) I think del should not move items to trash from the library root. The behavior should be consistent throughout Zotero.

    Alternatively, and perhaps ideally, to stay consistent with system shortcuts (and I'll be referring to Windows shortcuts here), I think del should prompt and move items to trash globally, while ctrl+del (so it's not confused with shift+del function to bypass trash) should be removing items from collection globally. This is a complete flip in shortcuts, so I don't think it's worth user confusion at this point.

    Edit: by globally I mean while inside a collection or while in library root, not that ctrl+del should remove item from all collections.
  • I should have searched the forums before asking, uh...: http://forums.zotero.org/discussion/20148/deleting-attachment-notes/
    (and the original thread)

    A list of useful shortcuts would be a great addition the wiki: in the knowledge base perhaps?

    Anyway, is it consistent (and user-friendly) to have del and ctrl+del having different effects depending on the context (in My Library or in a collection)?
      ctrl+del in My Library deletes the item without confirmation dialog
      ctrl+del in a collection deletes the item with a confirmation dialog
      del in My Library deletes the item with a confirmation dialog
      del in a collection removes the item from the collection (without confirmation dialog)
  • I think it's definitely worth it to add a kb entry on keyboard shortcuts.
    That could also include the + and - keyes, shift+enter while editing authors, as well as the shortcuts specified under pref. --> shortcuts and for the word processor plugin.

    That said, I'm wondering if delete and shift+delete should maybe even be included (though not modifiable) in the preferences, where regular users are more likely to see them: Let's face it, a kb article will reach 10% of users max (and that's counting multiplier effects etc.).
  • I'm wondering if delete and shift+delete should maybe even be included
    Yes, I was thinking about this option too.
  • Let's face it, a kb article will reach 10% of users max (and that's counting multiplier effects etc.)
    OT, but this is a huge problem with most of Zotero documentation.
  • Can we elaborate a list of shortcuts?
    That could include "ctrl" to display which collection an item is in.
  • edited February 26, 2013
    Can we elaborate a list of shortcuts?
    - +/- expand collapse list in middle panel
    - ctrl/alt/opt - display collection an item is in
    - shift+enter - create new empty creator field when editing creator
    - delete /ctrl+del - see above

    WP plugin
    - ctrl+down - open details
    - :123 and p.123 for page numbers

    The page should likely also mention Zutilo/Keyconfig as an option for additional shortcuts as well as the shortcuts in the pref panel.
  • edited February 26, 2013
    OT, but this is a huge problem with most of Zotero documentation.
    I've started writing a manual
    https://github.com/adam3smith/zotero-workshops/tree/master/Handbook
    and I'd be happy for collaborators.
    Many people still won't read it, but it'll make it easier to find things for those who are looking and I believe librarians in particular might like it.
    It'd also facilitate translation because it's one cohesive doc.
  • edited February 26, 2013
    Right, but since del is associated with removing items from collection rather than moving them to trash (except for the library root), the next step up (which in my mind is shift+del) would be moving them to trash.
    Right, that's the logic here. I don't imagine we were aware of the Windows shortcut when we chose Ctrl-Del, so I'd be open to changing that to Shift for consistency with the OS.
    IMO, for consistency (and now that I know ctrl+del exists) I think del should not move items to trash from the library root. The behavior should be consistent throughout Zotero.
    The model here originally was iTunes, where Delete within the library root prompts for deletion, while Delete within a playlist removes from the playlist without warning and Option-Delete prompts for deletion. (Granted, after the disaster that is iTunes 11 we should probably just do the exact opposite of whatever iTunes does...) I think the idea here is that removing from a collection is the common, less drastic action in a collection. That said, a lot of users surely leave a lot of items in their library root accidentally.

    (On an semi-related tangent, I think people delete collections all the time without intending to leave items behind, and it's actually rather hard to delete all items in a collection hierarchy unless you turn recursiveCollections on, so there should probably be a better way to do that—checkbox in the confirmation dialog or a separate menu option.)
  • That said, I'm wondering if delete and shift+delete should maybe even be included (though not modifiable) in the preferences
    I don't think that's necessary—as (partially) documented above, there are all sorts of keystrokes you can press that have more to do with just how keystrokes work (in Mozilla apps and/or the OS)—but we should have a link to a documentation page from that pane.
  • IMO shift+del makes more sense for these actions on Windows (shift+del is the shortcut for deleting items without moving them to trash). I think this is also the case on Ubuntu
    I've switched us to Shift-Delete on Windows/Linux for 4.0.
  • My problem is related to this, but different. I have dozens of items with two pdf attachments; one exists and the other does not. I want to just "delete" the non-existent pdf, but when I select the bad attachment and try any/all of the delete combinations, the result is that the whole item is moved to the trash. I then go to the trash and restore to library and the item is restored to the library without the bad attachment. This seems odd indeed to me; is there any way I can simply delete an attachment without deleting and then restoring the whole item?
  • This is not quite related, so first, start a new thread.

    While you're at it, check your database integrity (Preferences... -> Advanced -> Files and Folders -> Check Database Integrity). If that doesn't turn anything up, provide a Debug ID for the action of deleting the attachment (and having the whole item moved to trash).
  • Can we elaborate a list of shortcuts?
    Finally done here (for 5.0): https://www.zotero.org/support/kb/keyboard_shortcuts
    Please correct any mistakes!
Sign In or Register to comment.