Skip to content
Snippets Groups Projects
Commit d7f19927 authored by dg's avatar dg
Browse files

Ctrl+v works in all textboxes

git-svn-id: http://svn.net-core.org/repos/t-engine4@5977 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8deecc42
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,19 @@ function _M:generate()
end
end
end,
[{"_v", "ctrl"}] = function(c)
local s = core.key.getClipboard()
if s then
for i = 1, #s do
if #self.tmp >= self.max_len then break end
local c = string.sub(s, i, i)
table.insert(self.tmp, self.cursor, self.filter(c))
self.cursor = self.cursor + 1
self.scroll = util.scroll(self.cursor, self.scroll, self.max_display)
end
self:updateText()
end
end,
}
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment