1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-25 12:47:41 +00:00

tweaks + Anavrins disk usage system module

This commit is contained in:
kepler155c@gmail.com
2019-07-02 10:19:08 -04:00
parent aec5ac0121
commit 1dcb6d67b7
7 changed files with 200 additions and 54 deletions

View File

@@ -5,19 +5,18 @@ local keyboard = _G.device.keyboard
local os = _G.os
local textutils = _G.textutils
local data
kernel.hook('clipboard_copy', function(_, args)
data = args[1]
keyboard.clipboard = args[1]
end)
keyboard.addHotkey('shift-paste', function()
local data = keyboard.clipboard
if type(data) == 'table' then
local s, m = pcall(textutils.serialize, data)
data = (s and m) or Util.tostring(data)
data = s and m or Util.tostring(data)
end
-- replace the event paste data with our internal data
-- args[1] = Util.tostring(data or '')
if data then
os.queueEvent('paste', data)
end