forked from izaya/LuPPC
theoretically should be full support now
This commit is contained in:
parent
8260c8f59f
commit
300e2d1190
@ -111,11 +111,14 @@ function computer.signalTransformers.key_down(s, a, ascii, key, user)
|
||||
end
|
||||
if ascii == 27 then
|
||||
inesc = true
|
||||
return nil
|
||||
elseif inesc then
|
||||
if ascii < 48 and ascii > 57 and ascii ~= 59 then
|
||||
inesc = false
|
||||
key = escmap[ascii] or 0
|
||||
ascii = 0
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
return s, a, math.floor(asciitr[ascii] or ascii), keymap[ascii] or key, user
|
||||
@ -125,13 +128,28 @@ function computer.signalTransformers.key_up(s, a, ascii, key, user)
|
||||
if key ~= -1 then
|
||||
return s, a, ascii, key, user
|
||||
end
|
||||
if ascii == 27 then
|
||||
inesc = true
|
||||
return nil
|
||||
elseif inesc then
|
||||
if ascii < 48 and ascii > 57 and ascii ~= 59 then
|
||||
inesc = false
|
||||
key = escmap[ascii] or 0
|
||||
ascii = 0
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
return s, a, math.floor(asciitr[ascii] or ascii), keymap[ascii] or key, user
|
||||
end
|
||||
|
||||
-----
|
||||
|
||||
function api.pushSignal(s, ...)
|
||||
signalQueue[#signalQueue + 1] = {computer.signalTransformers[s](s, ...)}
|
||||
local result = table.pack(computer.signalTransformers[s](s, ...))
|
||||
if result.n == 0 then return end
|
||||
result.n = nil
|
||||
signalQueue[#signalQueue + 1] = result
|
||||
end
|
||||
|
||||
function api.pullSignal(timeout)
|
||||
|
Loading…
Reference in New Issue
Block a user