## Lynput - An easy and intuitive way to handle your inputs

lydzje
Prole
Posts: 5
Joined: Sun Jul 22, 2018 2:36 am
Contact:

### Lynput - An easy and intuitive way to handle your inputs

Hello everyone, I've been working on a library to handle input from some time ago for my personal use. Now I feel it's good enough to be published so here I am. This library is Lynput, and it lets you code your controls in a natural/intuitive way. For example:

Code: Select all

playerControl = Lynput()
playerControl:bind("jump", "press space")
playerControl:bind("shoot", "hold LMB")
playerControl:bind(
"moveLeft",
{
"hold left",
"hold a"
}
)
playerControl:bind(
"moveRight",
{
"hold right",
"hold d"
}
)
...

if playerControl.jump then jump() end
if playerControl.shoot then shoot() end
if playerControl.moveRight then moveRight() end
if playerControl.moveLeft then moveLeft() end

Devices supported:
- Keyboard
- Mouse buttons

Please let me know what do you think in the comments below or contacting me through email [email protected] or by visiting the contact section in my website lydzje.com.

NIL

monolifed
Party member
Posts: 120
Joined: Sat Feb 06, 2016 9:42 pm

### Re: Lynput - An easy and intuitive way to handle your inputs

can't we do something like this

Code: Select all

for k,v in pairs(playerControl.keys) do
if v then binds[k]() end
end

lydzje
Prole
Posts: 5
Joined: Sun Jul 22, 2018 2:36 am
Contact:

### Re: Lynput - An easy and intuitive way to handle your inputs

You don't want to loop playerControl. A lynput object contains more stuff aside from actions that have been bind.
NIL

narf0708
Prole
Posts: 1
Joined: Fri Feb 15, 2019 6:46 pm

### Re: Lynput - An easy and intuitive way to handle your inputs

Awesome, this is exactly what I was looking for.

### Who is online

Users browsing this forum: No registered users and 9 guests