Skip to content
forked from Lydzje/lynput

Lynput is an input library for LÖVE that makes input handling very easy and intuitive 💙

License

Notifications You must be signed in to change notification settings

UndeadTwo/lynput

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Keyboard
  • Mouse buttons
  • Gamepad buttons
  • Gamepad analog input
  • Touch screen
  • ...

Features

  • Multiple independent input objects
  • Easy and intuitive input binding and unbindig
  • Saving and loading input configuration files
  • Things like this: lynput:bind("superPunch", "press G_RB+G_X")
  • ...

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.

About

Lynput is an input library for LÖVE that makes input handling very easy and intuitive 💙

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 98.2%
  • Shell 1.8%