No description or website provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
console.lua
demo.png
main.lua

README.md

love-console

Features

  • Activate and deactivate the console with the ~ key.
  • Use the left and right arrows to navigate the cursor.
    • alt-left and alt-right navigate by word.
    • ctrl-left and ctrl-right navigate to the end of the buffer.
  • Automatically wraps commands with a return ... statement.
  • Use the up and down arrow keys to access history.
  • Use _ to access the last returned value, and last to access all of the last returned values as a table.
  • Use ctrl+ and ctrl- to change font size.
  • Use clear to clear the console.
    • Add custom commands to console.COMMANDS.
  • Use console.ENV to expose objects to the REPL.

Integrating the Console

console = require "console"
love.keyboard.setKeyRepeat(true) -- Not required.

function love.keypressed(key, scancode, isrepeat)
  console.keypressed(key, scancode, isrepeat)
end

function love.textinput(text)
  console.textinput(text)
end

function love.draw()
  console.draw()
end