term.getCursorPos

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  Function term.getCursorPos
Returns the location of the cursor on screen.
Syntax term.getCursorPos()
Returns x, y
Part of ComputerCraft
API term

Examples

Grid paper.png  Example
Prints the location of the cursor on screen.
Code
local x, y = term.getCursorPos()
print(x .. ", " .. y)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox