p0deje / Maccy

Lightweight clipboard manager for macOS
https://maccy.app
MIT License
11.51k stars 495 forks source link

⌘⌫ is captured by search field and does not delete history entry #793

Open fdegiuli opened 1 month ago

fdegiuli commented 1 month ago

Before Submitting Your Bug Report

Maccy Version (see 'About' window)

0.31.0

macOS Version

14.5 (23F79)

Maccy Settings

{
    "KeyboardShortcuts_delete" = "{\\"carbonModifiers\\":256,\\"carbonKeyCode\\":51}";
    "KeyboardShortcuts_pin" = "{\\"carbonModifiers\\":256,\\"carbonKeyCode\\":35}";
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":768,\\"carbonKeyCode\\":9}";
    "LaunchAtLogin__hasMigrated" = 1;
    "NSWindow Frame SUUpdateAlert" = "650 492 620 398 0 0 1920 1055 ";
    "NSWindow Frame com.sindresorhus.Settings.FrameAutosaveName" = "739 448 542 436 0 0 1920 1055 ";
    SUAutomaticallyUpdate = 0;
    SUEnableAutomaticChecks = 1;
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2024-06-19 00:08:20 +0000";
    SUSendProfileInfo = 0;
    SUUpdateGroupIdentifier = 390072107;
    avoidTakingFocus = 1;
    enabledPasteboardTypes =     (
        "public.utf8-plain-text",
        "public.png",
        "public.tiff",
        "public.html",
        "public.rtf",
        "public.file-url"
    );
    hideFooter = 1;
    hideSearch = 0;
    hideTitle = 1;
    ignoredPasteboardTypes =     (
        "de.petermaurer.TransientPasteboardType",
        "Pasteboard generator type",
        "net.antelle.keeweb",
        "com.agilebits.onepassword",
        "com.typeit4me.clipping"
    );
    menuIcon = scissors;
    migrations =     {
        "2020-04-25-allow-custom-ignored-types" = 1;
        "2020-06-19-use-keyboardshortcuts" = 1;
        "2020-09-01-ignore-keeweb" = 1;
        "2021-02-20-allow-to-customize-supported-types" = 1;
        "2021-06-28-add-title-to-history-item" = 1;
        "2021-10-16-remove-dynamic-pasteboard-types" = 1;
        "2022-08-01-rename-suppress-clear-alert" = 1;
        "2022-11-14-add-html-rtf-to-supported-types" = 1;
        "2023-01-22-add-regexp-search-mode" = 1;
    };
    pasteByDefault = 1;
    popupPosition = center;
    popupScreen = 0;
    previewDelay = 1000;
    removeFormattingByDefault = 1;
    searchMode = fuzzy;
    showRecentCopyInMenuBar = 0;
}

Description

The ⌘⌫ shortcut on my mac performs "delete line until cursor". I think this is the default behavior of Mac OS. When trying to delete a history entry using ⌘⌫, this behavior seems to be captured by the search field, and the search field is cleared instead. The history entry remains in the list.

Changing the binding to ⇧⌫ (or anything else, really) fixes the problem.

Steps to Reproduce

  1. Have things in clipboard history
  2. Open the history
  3. Select an entry
  4. Hit Cmd-Backspace
  5. See nothing happen
  6. Type text, see it populate in the search field
  7. Hit Cmd-Backspace again
  8. See all text disappear from search field
p0deje commented 1 month ago

Maccy is keyboard-driven in the sense that almost everything you press is sent to a search field. I don't think that this is generally an issue as I'd expect ⌘⌫ to remove what I entered in the search field.

I'll see what's the best way to handle this - either forbid using ⌘⌫ for "Delete" command or actually respect it.

fdegiuli commented 1 month ago

Ah, I thought that was the default delete command. Maybe I changed it while I was setting up, and forgot.

On Tue, Jun 18, 2024, 7:39 PM Alex Rodionov @.***> wrote:

Maccy is keyboard-driven in the sense that almost everything you press is sent to a search field. I don't think that this is generally an issue as I'd expect ⌘⌫ to remove what I entered in the search field.

I'll see what's the best way to handle this - either forbid using ⌘⌫ for "Delete" command or actually respect it.

— Reply to this email directly, view it on GitHub https://github.com/p0deje/Maccy/issues/793#issuecomment-2177431258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHCYINYPGYPR6TCM4A4OGLZIDVPTAVCNFSM6AAAAABJQ75XKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXGQZTCMRVHA . You are receiving this because you authored the thread.Message ID: @.***>

p0deje commented 1 month ago

The default is ⌥⌫.