The Terminal is a peripheral device available for CraftOS. Type "help peripheral" to learn about using the Peripheral API to connect with peripherals. When a Terminal is connected, peripheral.getType() will return "terminal". A wrapped terminal can be used with term.redirect() to send all terminal output to the terminal.

Methods exposed by the Terminal:
write( text )
blit( text, textColor, backgroundColor )
clear()
clearLine()
getCursorPos()
setCursorPos( x, y )
setCursorBlink( blink )
isColor()
setTextColor( color )
setBackgroundColor( color )
getTextColor()
getBackgroundColor()
getSize()
scroll( n )
setPaletteColor( color, r, g, b )
getPaletteColor( color )

Events fired by the Terminal:
"terminal_key" when a key is pressed. Arguments are side, key, isRepeat
"terminal_key_up" when a key is released. Arguments are side, key
"terminal_char" when a character is typed. Arguments are side, character
"terminal_paste" when text is pasted. Arguments are side, text
"terminal_mouse_click" when an Advanced Terminal is clicked. Arguments are side, button, x, y
"terminal_mouse_up" when a mouse button is released. Arguments are side, button, x, y
"terminal_mouse_drag" when the mouse is dragged. Arguments are side, button, x, y
"terminal_mouse_scroll" when the mouse wheel is scrolled. Arguments are side, direction, x, y

Keyboard events are fired on both Terminal and Advanced Terminal.
Mouse events are only fired on Advanced Terminal.
