Unable to paste a name into Lix

Started by Silken Healer, August 14, 2023, 03:17:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Silken Healer

When I try to paste something into the name when first running Lix, I am unable to paste, because when I press Ctrl+V it just says "V" and does not paste what is in the clipboard.
Expected behaviour: Pastes what is on the clipboard into the name box when pressing Ctrl+V.
Running Lix version 0.10.13 on Windows 11 Home version 22H2.
Everything I've said here also applies to chaning the name agian in settings afterwads.

Simon

#1
Thanks, text copy-pasting is an ancient missing feature.

Luckily, Allegro 5 already allows access to the operating system's copy buffer. I have an unpublished hack of Lix that hard-wires Ctrl+V to paste the copy buffer into the focused the Lix texttyping field.

On Linux, this already looks reasonable. Problem: On Windows, you also get an extra 'v' into the field. Example: Field held "abc", OS copy buffer contains "def", you press Ctrl+v, field now holds "abcdefv".

This feels too buggy to release, but it's a start.

Author field in editor should also prefill with your username. It doesn't. It's another bug.




Everybody: This kind of bug report is really valuable: Seemingly-obvious stuff that doesn't work as you expect, but that doesn't seem to bother anybody else. This is because long-term users learned to tolerate the flaw. Tolerating is a nasty solution. Please always complain about annoying stuff. Sometimes, there are low-hanging fruit that I overlooked, and that I can quickly fix with big impact.

-- Simon

Simon

Fixed for 0.10.14, and released Lix 0.10.14. Ctrl+V is now hardcoded to paste the operating system's copy buffer. Enjoy! It doesn't print the extra v either anymore on Ctrl+V.

Also, Lix 0.10.14 pre-fills your username into the author field in the editor.

-- Simon

Dullstar

Quote from: Simon on August 14, 2023, 04:50:14 PM
This is because long-term users learned to tolerate the flaw. Tolerating is a nasty solution.

In fairness I imagine many long-time users never thought to try copy-pasting something in there. It's something that I would expect to work, but also something I probably wouldn't think to try until I have a reason I want to do it. Usually password fields are the most likely ones for me to paste into (as memorizing tons of unique secure passwords is basically impossible), but Lix doesn't have those. In most other situations it's easier to retype than to go grab the appropriate clipboard contents to be able to paste.

Simon

I agree that most fields are easy to retype. I don't exepct myself to paste much, either.

Even if we never paste, the bug report has led me to investigate and fix the discrepancy with editor's author field prefilling: New-level button in the editor prefilled author, create-level button in the singleplayer browser didn't prefill author in 0.10.13. In 0.10.14, both prefill author. I've merely guessed that the author field is the #1 field in Lix into where we might want to paste.

-- Simon

geoo

I think the main use case for pasting (and also copying) is the multiplayer chat, that's the only instance where I can remember missing it. Maybe level titles as well. The other minor nuisance is that you cannot move the text cursor, it's always at the end of the typing field. That's maybe a bigger issue than copying/pasting.
I guess these are the downsides of rolling your own custom code for these standard UI things...