Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What still needs to happen for clipboard to be supported? #48

Open
lesleyrs opened this issue Jan 29, 2023 · 1 comment · May be fixed by #59
Open

What still needs to happen for clipboard to be supported? #48

lesleyrs opened this issue Jan 29, 2023 · 1 comment · May be fixed by #59

Comments

@lesleyrs
Copy link
Contributor

lesleyrs commented Jan 29, 2023

I can see it correctly saves each pixel in sprite_sheet.txt and shows the copied/pasted message yet it does not work, so if you slap [gfx][/gfx] on a string with the data from current selected sprite we can copy and read it back minus [gfx][/gfx] for paste?

Then we need to be able to access to stat(4)/clipboard to read it in a game/tool.

Is that it?

Also I know Pico-8 has intentional limitations about reading/writing clipboard which is quite annoying for my usecase here: https://github.com/lesleyrs/pico-paint

This is to prevent a cartridge from accessing potentially-sensitive data on the host system's clipboard without the user's permission. - from https://pico-8.fandom.com/wiki/Clipboard

I couldn't find an answer why this would be bad on pico-8 as it doesn't have any built-in network capabilities so the worst that could happen is a game displaying your clipboard on screen, which could be annoying if somebody was livestreaming it and happens to copy his passwords. And even then they wouldn't know their username?

IMO that's not worth being a big inconvenience though, I would much rather have a notification on launch that shows if the application could try to access clipboard. Just like the devkit mode notification in pico-8 informing people.

Thx for coming to my TED talk.

@jjant
Copy link
Owner

jjant commented Feb 11, 2023

Hey there, thank you for the help. This doesn't work like you expect because I didn't use the system clipboard when implementing Runty8's clipboard 😅:

"Copying" right now means writing to an in-memory vec of pixels, and similarly "pasting" is reading from it.

We should probably change this to be like Pico8, using the real clipboard and the [gfx]...[/gfx] formatted strings, I just didn't know that's how it worked at the time.

@jjant jjant linked a pull request Feb 12, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants