Clipboard access

Is there any way to get the contents of the clipboard for use in the code?

As in, grab the clipboard contents, and change it from firmware, or iterate through it or something? That is not possible. The closest you can get is simulate copy, paste, cut, and delete shortcuts, but that’s not all that useful.

It may be possible to grab the clipboard and send it to the keyboard, but that would require a special program on the OS side too.

I just want to copy the clipboard contents to a variable in my code.

This is for the vi layer to determine if the next character after the cursor is whitespace - I want to execute ctrl shift right arrow ctrl c left arrow to get the next character in the clipboard and then test it.

Is there a better way to do that?

How would I do it with a special program on the OS side?

Ah. Nope, can’t do that without a special program.

I think it would be a lot easier to do this completely on the the host side. Pushing this onto the keyboard is possible, but… it would be like trying to scratch your left ear with your left foot. You can do it if you absolutely must, but there are better ways.

The Focus plugin is one way, but I’d highly recommend trying to find a way to do this on the host side completely. It’s a lot easier.

Out of curiosity, what do you want to do with this information? Meaning, once you’ve determined that the next character after the cursor is a space, then what happens?

vi has commands which move to the next whitespace delimited word, for instance. I want to emulate that. I also want to be able to search for arbitrary characters.

1 Like

Do you have any thoughts on a way to do it completely on the host side?

Maybe autohotkey? https://github.com/rcmdnk/vim_ahk