move multishell functionality to kernel
This commit is contained in:
@@ -2,16 +2,17 @@ _G.requireInjector()
|
||||
|
||||
local Util = require('util')
|
||||
|
||||
local multishell = _ENV.multishell
|
||||
local textutils = _G.textutils
|
||||
local kernel = _G.kernel
|
||||
local keyboard = _G.device.keyboard
|
||||
local textutils = _G.textutils
|
||||
|
||||
local data
|
||||
|
||||
multishell.hook('clipboard_copy', function(_, args)
|
||||
kernel.hook('clipboard_copy', function(_, args)
|
||||
data = args[1]
|
||||
end)
|
||||
|
||||
multishell.addHotkey('shift-paste', function(_, args)
|
||||
keyboard.addHotkey('shift-paste', function(_, args)
|
||||
if type(data) == 'table' then
|
||||
local s, m = pcall(textutils.serialize, data)
|
||||
data = (s and m) or Util.tostring(data)
|
||||
|
||||
Reference in New Issue
Block a user