Git Product home page Git Product logo

Comments (9)

benanders avatar benanders commented on June 14, 2024

I fixed the duplication issue, how do you suppose I detect a copy and paste from a user input?

from luaide.

theoriginalbit avatar theoriginalbit commented on June 14, 2024

well I'm not too sure because I haven't read your code thoroughly but I'm assuming when you have user input you pass it to a function that deals with duplicating the appropriate symbols? If so then just have the paste bypass that and just do a straight concat?

from luaide.

benanders avatar benanders commented on June 14, 2024

Yeah, but how do I detect a paste? :P How do I tell the difference between the user typing something, and CC typing something as a paste?

EDIT: hang on, were you talking about pasting lines, or when control+v is pressed?

from luaide.

superaxander avatar superaxander commented on June 14, 2024

You can detect pasting with ctrl+v or when the char event gets multiple chars inside the string

from luaide.

benanders avatar benanders commented on June 14, 2024

o.O so that's why the edit program does x = x+char:len() instead of x = x+1...

But if that's the case, then this shouldn't cause problems (I think). I'll look into it.

from luaide.

theoriginalbit avatar theoriginalbit commented on June 14, 2024

I've had a look and I can't see it... where do you actually handle the paste?

from luaide.

benanders avatar benanders commented on June 14, 2024

BIT: I don't handle pastes. CC just converts every letter of the paste into a char event.

superaxander: a paste isn't treated as a single char event. I just tested it. http://i.imgur.com/aXsOwpF.png

So basically there's no way for me to differentiate between the user pressing a key and CC pasting something in, so I can't actually do this BIT :( (that is, the part about stopping pasting from triggering the double "") Also, this won't happen when using the built in paste line function.

from luaide.

superaxander avatar superaxander commented on June 14, 2024

Ok. But I still recommend using the length cause I know many auto-typers that use multiples letters in one char event and it makes it easier for my os to copy paste into your program 👍

from luaide.

benanders avatar benanders commented on June 14, 2024

Added that and fixed the first part of BIT's post.

from luaide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.