Hey there fellas
To check if the "key" in love.keypressed(key) is a letter from a-z i checked it with string.byte() if its inbetween 97 and 122 and it even worked a bit
BUT For some reason when i press Ctrl or Alt the string.byte() returns 108("f" in ascii)? Shift returns 111 and other keys some weird stuff too probably
Not sure if im missing something there but is there a way around this?
String.byte() of love.keypressed(key) argument
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 4
- Joined: Fri Aug 12, 2016 10:34 am
-
- Prole
- Posts: 4
- Joined: Fri Aug 12, 2016 10:34 am
Re: String.byte() of love.keypressed(key) argument
Oh okay lol it just checks the first letters of "lalt" or "lctrl" strings
See you later fellas
See you later fellas
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: String.byte() of love.keypressed(key) argument
You should use love.textinput if you want the game to recognize when the user types text.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests