Author Topic: Unable to paste a name into Lix  (Read 3921 times)

0 Members and 1 Guest are viewing this topic.

Offline Silken Healer

  • Posts: 190
    • View Profile
Unable to paste a name into Lix
« on: August 14, 2023, 03:17:08 PM »
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.
« Last Edit: August 14, 2023, 04:50:20 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3877
    • View Profile
    • Lix
Re: Unable to paste a name into Lix
« Reply #1 on: August 14, 2023, 04:50:14 PM »
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
« Last Edit: August 14, 2023, 06:08:26 PM by Simon »

Offline Simon

  • Administrator
  • Posts: 3877
    • View Profile
    • Lix
Re: Unable to paste a name into Lix
« Reply #2 on: August 14, 2023, 10:31:21 PM »
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

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: Unable to paste a name into Lix
« Reply #3 on: August 19, 2023, 09:58:20 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.

Offline Simon

  • Administrator
  • Posts: 3877
    • View Profile
    • Lix
Re: Unable to paste a name into Lix
« Reply #4 on: August 21, 2023, 03:03:21 AM »
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

Offline geoo

  • Administrator
  • Posts: 1475
    • View Profile
Re: Unable to paste a name into Lix
« Reply #5 on: August 22, 2023, 08:38:03 AM »
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...