mirror of
https://github.com/kepler155c/opus
synced 2025-10-30 07:03:01 +00:00
build using command computer
This commit is contained in:
@@ -51,14 +51,20 @@ ct.clear()
|
||||
ct.setCursorPos(1, 1)
|
||||
|
||||
local filter = Util.transpose({
|
||||
'char', 'paste', 'key', 'key_up',
|
||||
'char', 'paste', 'key', 'key_up', 'terminate',
|
||||
'mouse_scroll', 'mouse_click', 'mouse_drag', 'mouse_up',
|
||||
})
|
||||
|
||||
while true do
|
||||
local e = Event.pullEvent()
|
||||
local e = { os.pullEventRaw() }
|
||||
local event = e[1]
|
||||
|
||||
if filter[event] then
|
||||
socket:write(e)
|
||||
else
|
||||
Event.processEvent(e)
|
||||
end
|
||||
|
||||
if not socket.connected then
|
||||
print()
|
||||
print('Connection lost')
|
||||
@@ -66,16 +72,4 @@ while true do
|
||||
read()
|
||||
break
|
||||
end
|
||||
|
||||
if filter[event] then
|
||||
|
||||
if not socket:write(e) then
|
||||
socket:close()
|
||||
break
|
||||
end
|
||||
|
||||
elseif event == 'terminate' then
|
||||
socket:close()
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user