TextToolsPro icon indicating copy to clipboard operation
TextToolsPro copied to clipboard

Clipboard access

Open quintrino opened this issue 1 year ago • 1 comments

Hi,

I've seen you've stated that Android 10 and above doesn't allow access to the clipboard, but it has been working for me in the Texpand app, so they must have found some workaround, not sure what it is though.

Thanks for such a great app, espanso integration is a killer feature!

quintrino avatar Sep 17 '24 13:09 quintrino

I'll make sure to check if I can get this working when I start working for the next update 👍

lochidev avatar Sep 17 '24 14:09 lochidev

Unfortunately I couldn't find how they have done it. The only workaround I know is to use a sort of a dummy form.

- trigger: :cx
  replace: "here is the replacement from cb: {{cxx}}"
  vars:
  - name: cxx
    type: clipboard

in combination with

- trigger: :clip
  form: |
      [[text]],
  form_fields:
      text:
        multiline: true

will work when you first trigger the dummy form by typing :clip and then on the form text field you can type :cx and then you can submit. As far as I know after android 10, the app MUST be in the FOREGROUND to access the clipboard. While using forms this app is in the foreground, hence this works.

lochidev avatar Jan 20 '25 08:01 lochidev

ah, no need, I automated the above trick and it works. will be included in the next release soon.

lochidev avatar Jan 20 '25 14:01 lochidev

Let me know if v7.1.0 fixes this!

lochidev avatar Jan 20 '25 16:01 lochidev

Yep, I did a test and it seems to be working. Thanks so much!

Will you be adding clipboard to the template variables?

quintrino avatar Jan 27 '25 05:01 quintrino

Will do in a future update! :D

lochidev avatar Jan 27 '25 16:01 lochidev