term.setCursorBlink

Sets whether or not a blinking cursor should appear at the current cursor pos in the terminal object. When the cursor moves, the blinking cursor will move too, and it will continue to blink until it is manually turned off.

ExampleToggle blinking cursor
Lets the user press enter to toggle whether or not the cursor is blinking.
Code
<nowiki>
local blinking = false

print("Press enter to toggle whether or not the cursor is blinking.")
while true do
  local event, key = os.pullEvent("key")

  if key == keys.enter then
    blinking = not blinking -- Toggle blinking state.
    term.setCursorBlink(blinking)
    print("Blinking:", blinking)
  end
end
  </nowiki>
Output

term.setCursorBlink
Function
Syntax
term.setCursorBlink(
  • blink : boolean
)

Returns nil
API term
Source CC:Tweaked (source)
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.