forked from Hyperion/HyperionOS
made dev files (includeing tern) also fixed differnt keyboard layouts hopefully
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
-- :Minify:--
|
||||
local kernel = ...
|
||||
|
||||
local timeout = false
|
||||
kernel.processes.keventd = function()
|
||||
while true do
|
||||
local event = {kernel.computer:getMachineEvent()}
|
||||
if event[1] then
|
||||
if event[1] == "keyTyped" then
|
||||
if event[3] == "\x1b^s" then
|
||||
kernel.shutdown()
|
||||
elseif event[3] == "\x1b^r" then
|
||||
kernel.reboot()
|
||||
end
|
||||
end
|
||||
kernel.io.pushEvent("raw", table.unpack(event))
|
||||
timeout = false
|
||||
else
|
||||
timeout = true
|
||||
end
|
||||
if timeout then sleep(.05) end
|
||||
end
|
||||
end
|
||||
---- :Minify:--
|
||||
--local kernel = ...
|
||||
--
|
||||
--local timeout = false
|
||||
--kernel.processes.keventd = function()
|
||||
-- while true do
|
||||
-- local event = {kernel.computer:getMachineEvent()}
|
||||
-- if event[1] then
|
||||
-- if event[1] == "keyTyped" then
|
||||
-- if event[3] == "\x1b^s" then
|
||||
-- kernel.shutdown()
|
||||
-- elseif event[3] == "\x1b^r" then
|
||||
-- kernel.reboot()
|
||||
-- end
|
||||
-- end
|
||||
-- timeout = false
|
||||
-- else
|
||||
-- timeout = true
|
||||
-- end
|
||||
-- if timeout then sleep(.05) end
|
||||
-- end
|
||||
--end
|
||||
|
||||
Reference in New Issue
Block a user