love.keypressed detecting keys incorrectly
Posted: Thu Feb 06, 2014 2:47 pm
Hi Pro's,
I am making a basic Lua console which involves inputting text and when you press enter that code being run. I am trying to implement a copy and paste feature however when I press "v" on the keyboard the love.keypressed(sKey) function thinks I pressed "lctrl" for some reason and so I cannot implement a ctrl+v key detection.
A copy of the code can be found here http://pastebin.com/24uusABT. On line 67 I check for the user pressing "v" and if the ctrl key is down. if you take a look at line 66 you will see I record any key the user presses in a var and I display that in the top line of the console for troubleshooting, you can use this to test for yourselves
I am using love 0.9.0 so I could possibly use the love.textinput(sText) function however I would like to implement it in the keypressed function if possible. Any assistance would be greatly appreciated
EDIT: I cannot even use the textinput function as it does not detect the "v" when I press ctrl+v
I am making a basic Lua console which involves inputting text and when you press enter that code being run. I am trying to implement a copy and paste feature however when I press "v" on the keyboard the love.keypressed(sKey) function thinks I pressed "lctrl" for some reason and so I cannot implement a ctrl+v key detection.
A copy of the code can be found here http://pastebin.com/24uusABT. On line 67 I check for the user pressing "v" and if the ctrl key is down. if you take a look at line 66 you will see I record any key the user presses in a var and I display that in the top line of the console for troubleshooting, you can use this to test for yourselves
I am using love 0.9.0 so I could possibly use the love.textinput(sText) function however I would like to implement it in the keypressed function if possible. Any assistance would be greatly appreciated
EDIT: I cannot even use the textinput function as it does not detect the "v" when I press ctrl+v