Copy Command

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Camewel
Prole
Posts: 20
Joined: Thu Apr 19, 2012 5:58 pm

Copy Command

Post by Camewel »

Hey, I was wondering, is there was any way to make a LÖVE app put a string in the clipboard? I was looking in the wiki and I can't find anything in there about it, but I don't know what it would be under anyway. It would just be nice for a feature I was planning on.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Copy Command

Post by Nixola »

No, it's not possible yet
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Copy Command

Post by Jasoco »

I think it would be nice if this were implemented. It could be useful to keep the game feeling like a native app. Minecraft took forever to have this feature implemented so you could paste IP addresses into the server screen. Or seeds to create worlds. Simple commands for saving a string to the clipboard and retrieving it from it would be nice. And if possible, maybe more advanced feature like detecting if it's image data and being able to paste it into imageData or save an image, quad or imageData to the clipboard would be pretty cool.

Unless it would be insecure. But as long as Löve has complete control the whole time it should be fine.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Copy Command

Post by bartbes »

Except it's extremely hard for us to implement this at the time of writing.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Copy Command

Post by Jasoco »

Doesn't the language Löve is written in for each OS have native OS commands to retrieve/send data from/to the clipboard? It's pretty standard stuff I would think.
User avatar
Adamantos
Prole
Posts: 27
Joined: Sun May 16, 2010 10:47 pm

Re: Copy Command

Post by Adamantos »

I think, that you can access the system's clipboard by calling some commandline tools.
There is a way to do this by some native system commands under Linux / OSX:

XSEL under Linux
PBCOPY under OSX
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Copy Command

Post by bartbes »

Jasoco wrote:Doesn't the language Löve is written in for each OS have native OS commands to retrieve/send data from/to the clipboard? It's pretty standard stuff I would think.
They differ for each platform and would require pretty low-level stuff to get the needed info out of SDL too, basically, it's a whole lot of hassle for something that can break at any time.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Copy Command

Post by Jasoco »

Fair enough. It's not a huge bother. More of a convenience feature really.
Post Reply

Who is online

Users browsing this forum: keharriso and 2 guests