require "mp.msg" function append_from_clipboard() local process = assert(io.popen("xclip -o -selection clipboard")) local url = process:read("*all") local rc = {process:close()} mp.command("show-text \"Add: " .. url .. "\"") mp.command("loadfile \"" .. url .. "\" append-play") end mp.add_key_binding("Shift+INS", "append_from_clipboard", append_from_clipboard)