Unexpected-Keyboard icon indicating copy to clipboard operation
Unexpected-Keyboard copied to clipboard

Copy, paste, undo, redo inconsistent behavior

Open Darkar25 opened this issue 10 months ago • 7 comments

Looks like copy, paste, undo, redo "actions" behave differently from their alternative keybinds. So these actions manage the app's internal clipboard and history rather than sending the corresponding Ctrl+<key> keybind. It works fine most of the time, but under some specific circumstances these become inoperable while manually pressing Ctrl+<key> still works. I propose adding a toggle that switches these actions from internal state management to emulating their corresponding keybinds.

Darkar25 avatar Feb 26 '25 07:02 Darkar25

One of such "specific circumstances" is when an app listens for keyboard inputs and forwards them elsewhere, for example a remote keyboard app. It doesn't have a "text input field", so there is no text to select or copy so the actions do nothing. Pressing Ctrl+A though is being correctly handled by the app.

Darkar25 avatar Feb 26 '25 07:02 Darkar25

One of such "specific circumstances" is when an app listens for keyboard inputs and forwards them elsewhere, for example a remote keyboard app.

That's an extremely important information. It's possible that the keyboard could detect such case and automatically switch to the Ctrl+shortcuts without you noticing.

Julow avatar Feb 27 '25 20:02 Julow

Not sure if this fits here or should go in a separate issue: copy and cut should be a no-op if nothing is selected. I cannot count how many times I cleared my clipboard because I performed a copy instead of a paste.

relikd avatar Mar 30 '25 09:03 relikd

@relikd, for me, it is a no-op (in Github). It may send Ctrl-X or Ctrl-C to your app. "If nothing is selected", you'd lose nothing, right? Can you recover deleted text with the Clipboard Manager?

Spike-from-NH avatar Mar 30 '25 13:03 Spike-from-NH

  1. Type "hi"
  2. select all
  3. cut
  4. paste (it pastes "hi")
  5. delete text field content
  6. copy (empty text selection)
  7. paste (it pastes nothing and the "hi" is lost)

In a normal situation I would skip step 4 & 5 obviously.

And yes, the "hi" would remain in the clipboard manager history. But I dont use the manager and further, I have disabled to keep a history of my clipboard for privacy reasons.

relikd avatar Mar 30 '25 20:03 relikd

I duplicated your results in the Github reply box. However, trying the same test in the text editor of Fossify File Manager, the copy of nothing produces a pop-up, "Failed to copy to clipboard" (It can also respond, "Item already copied to clipboard.") and paste recovers "Hi". I think your gripe is with Github.

I understand your privacy concerns, but I enabled Clipboard Manager and confirm it has a copy of the lost text.

Spike-from-NH avatar Mar 30 '25 21:03 Spike-from-NH

Its not github-is-an-outlier, its the other way around, your Fossify seems to do some error handling. I tried a few apps and all of them loose my clipboard, including my web browser in general.

Of course it has a copy, thats its whole functionality. I hope your suggestion is not to enable it to fix my issue. I dont want any credit card details or passwords accidentially exposed to anyone who holds my phone.

relikd avatar Mar 31 '25 02:03 relikd