Lydzje / lynput

Lynput is an input library for LÖVE that makes input handling very easy and intuitive :blue_heart:
MIT License
38 stars 2 forks source link

Lynput

LÖVE VERSION MIT LICENSE

lynput logo

Index

What is Lynput?

Lynput is an input library for LÖVE that makes input handling very easy and intuitive 💙. It will make you able to do things like this:

function love.load()
  Lynput = require("Lynput") -- Load Lynput
  Lynput.load_key_callbacks() -- Load keyboard callbacks
  control = Lynput() -- Create a Lynput object

  control:bind(
    "moveLeft",
    {
      "hold left",
      "hold a",
    }
  )
  control:bind(
    "moveRight",
    {
      "hold right",
      "hold d",
    }
  )
  control:bind("action", "press f")
  control:bind("obey", "release any")
end

function love.update(dt)
  if control.moveLeft  then x = x - speed * dt end
  if control.moveRight then x = x + speed * dt end
  if control.action    then triggerAction()    end
  if control.obey      then obey()             end

  Lynput.update_(dt) -- Update Lynput
end

Installation

Just download the latest release version of Lynput.lua and extract the contents from the zip file. Place the Lynput.lua file anywhere you want inside your game folder, just be careful with the path when requiring the library. Also remember that this file name starts with a capital letter.

Usage

See MANUAL for more information.

Devices supported

Features

What does Lynput mean?

if not creativity then
    name = Lydzje + input
    print(name)
end -- if not creativity

Output:

Lynput

I've found a bug, what do I do?

If you want to report a bug (please do!), open a new issue. As another option just contact me.

Contact

If you need to contact me don't hesitate to send me an email. If you preffer other way, please visit the contact section in my website lydzje.com.

License

This software is licensed under the MIT license. Check the details by clicking here.