I cannot successfully paste sprites in the Education Edition in either Chrome or Firefox.
Reproduction steps
- Go to https://www.pico-8-edu.com/
- Hit escape
- Click the sprite editor tab
- Draw a red cross in sprite 1
- Press ctrl+c. See "copied 1x1 sprites"
- Select sprite 2
- Press ctrl+v. See "pasted 1x1 sprites"
Although the text "pasted 1x1 sprites" appears, sprite 2 remains blank
Reproduction 2
- Go to https://www.pico-8-edu.com/
- Hit escape
- Click the sprite editor tab
- Fill sprite 1 red
- Fill sprite 2 blue
- Select sprite 1
- Press ctrl+c.
- Click the code editor tab
- Press ctrl+v. Observe pasted text is mostly 8s (for red).
- Click the sprite editor tab
- Select sprite 2
- Press ctrl+v(!). Observe sprite is unchanged. (EDITED - I had this wrong originally.)
- Click the code editor tab
- Press ctrl+v. Observe pasted text is mostly Cs (for blue)!
Hypothesis - when ctrl+v is pressed a copy operation is triggered immediately before the paste. This explains why the paste seems not to work - it pastes the sprite that was just copied, and why the clipboard contents have unexpectedly changed in the second reproduction. Perhaps this is related to confusion between ctrl and cmd for Mac? I haven't tested this on Windows, so I'm not sure if the problem occurs there.
Yeah, copy paste on the web on Mac for PICO-8 is tough. You need to hit both the ctrl- and the cmd- version of the relevant key combination. I forget the right order, and whether or not it switches for copy and paste.
> You need to hit both the ctrl- and the cmd- version of the relevant key combination.
I found it to completely ignore cmd key combinations. In the text editor, ctrl+c and ctrl+v copy and paste as expected. (Well... allowing for the fact it's ctrl instead of cmd anyway.) cmd+c and cmd+v just type the letters "c" and "v" as if cmd was not pressed.
In the sprite editor, cmd+c and cmd+v do not appear to do anything. They do not trigger the "copied/pasted 1x1 sprites" messages.
I spent a while longer testing this, and discovered a strange workaround:
- Go to https://www.pico-8-edu.com/
- Hit escape
- Click the sprite editor tab
- Draw a red cross in sprite 1
- Press and hold ctrl
- Tap C without releasing ctrl. See "copied 1x1 sprites"
- Select sprite 2 with the mouse
- Tap V. See "pasted 1x1 sprites"
- Release ctrl
In this case, the red cross is successfully copied to sprite 2!
After some experimentation, here's my best model for what seems to be happening:
- There's some state I'll call the "copy flag", which can be either "ready" or "spent".
- The copy flag becomes "ready" either when ctrl is pressed or released, I can't tell which.
- When attempting a copy or paste operation, the flag determines whether a copy will occur:
- ctrl-c with "ready" copy flag - a normal copy occurs
- ctrl-c with "spent" copy flag - no effect, the clipboard is unchanged (although we still see "copied 1x1 sprites")
- ctrl-x with "ready" copy flag - a normal cut occurs
- ctrl-x with "spent" copy flag - the selected sprite is cleared but the clipboard is unchanged
- ctrl-v with "ready" copy flag - a copy occurs, followed by the intended paste
- ctrl-v with "spent" copy flag - a normal paste occurs
- ctrl-b with "ready" copy flag - the selected sprite is copied to the clipboard and then pasted at double scale
- ctrl-b with "spent" copy flag - a double scale paste occurs
- In all cases, the copy flag becomes "spent" after any such operation.
This seems to be consistent with what I see for a variety of sequences of button presses. For example, if I select a sprite, hold ctrl, tap v, select another sprite, tap v again and then release ctrl, the first sprite is copied to the second slot. Of course, I doubt the "copy flag" is intentionally implemented as such, it's probably some more complex unintended interaction.
All testing is on a Macbook Pro. I have tested exhaustively in Firefox and quickly checked my main results in Chrome and Safari.
[Please log in to post a comment]