Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function handleInput()
- --Handle CTRL keys.
- if(keyboard.isControlDown) then
- --Exit
- if(keyboard.isKeyDown(keyboard.keys.c)) then
- term.clear()
- running = false
- end
- else
- --Go up
- if(keyboard.isKeyDown(keyboard.keys.w)) then
- if not (selected == 1) then
- selected = selected - 1
- end
- refresh()
- --Go down
- elseif (keyboard.isKeyDown(keyboard.keys.s)) then
- if not (selected == getMachineListSize()) then
- selected = selected + 1
- end
- refresh()
- end
- end
- end
- while running do
- handleInput()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement