Not exactly a bug, more of a small quality of life.
In Terra: A Terraria Demake, I have the ability to load save files via pasting their content onto the game, but I have to clear the clipboard between checks. Doing so on the BBS causes a "CTRL+C TO COMPLETE COPY" banner to appear despite the fact that there is nothing to copy.
I'm clearing the clipboard via printh("","@clip")
.
I think that on the BBS, putting an empty string into the clipboard shouldn't bring up this message.
At least there should be a way to hide the message, in instances where PICO-8's clipboard is cleared like above and thus there is nothing for the user to copy anyway, or, say, debug code is pasting to the clipboard and the dev would like to allow users to CTRL+C at any point without popping up the message constantly.
Alternatively, a way to basically invalidate the last paste once it's been read (i.e. set it to an empty string, or nil) would be nice.
By the way, PRINTH() with "@clip" as the target seems to overwrite the clipboard regardless of the overwrite parameter. I suppose that's the "bug" section of this "bug report"
Unlikely this can be fixed due to security issues in the browser, and the way clipboards work (appending isn't allowed, since it could be image/text/any other kind of data).
One potential workaround is to detect ctrl-v directly, and only access the clipboard on the frame data is pasted:
while stat(30) do if(stat(31)=="コ") cb=stat(4) --ctrl-v combination was just pressed end |
Then you can treat cb like any normal variable, so set it to nil when you're done reading data. It's hacky, but it works.
Thanks, I didn't think of using stat to check for the keypress. That should hopefully achieve what I want.
[Please log in to post a comment]