{{newin|[[0.9.0]]|090|type=function}}
Puts text in the clipboard.
== Function ==
=== Synopsis ===
<source lang="lua">
love.system.setClipboardText( text )
</source>
=== Arguments ===
{{param|string|text|The new text to hold in the system's clipboard.}}
=== Returns ===
Nothing.
== Examples ==
Set up OS agnostic keybindings for a copy paste buffer.
<source lang="lua">
local buffer

function love.draw()

  love.graphics.print(
    "OS: "..love.system.getOS().."\n"..
    "Local buffer: "..tostring(buffer).."\n"..
    "System buffer: "..tostring(love.system.getClipboardText()))

end

function love.keypressed(key)

  local osString = love.system.getOS()

  local control

  if osString == "OS X" then
    control = love.keyboard.isDown("lgui","rgui")
  elseif osString == "Windows" or osString == "Linux" then
    control = love.keyboard.isDown("lctrl","rctrl")
  end

  if control then
    if key == "c" then
      if buffer then love.system.setClipboardText(buffer) end
    end
    if key == "v" then
      buffer = love.system.getClipboardText()
    end
  end

end
</source>

== See Also ==
* [[parent::love.system]]
* [[love.system.getClipboardText]]
[[Category:Functions]]
{{#set:Description=Puts text in the clipboard.}}
== Other Languages ==
{{i18n|love.system.setClipboardText}}