Detected the presence of a physical keyboard
Posted: Sat Mar 25, 2023 12:08 pm
Hi everyone
I was wondering if there is a way around Löve2D to detect the presence of a physical keyboard.
Because I am currently making a game that is PC / Android compatible and I am making a menu that displays the controls, so if a Gamepad is active it displays it otherwise it displays the keys on the keyboard but if we are on a phone I would have liked to display touch controls, so is there a way to do this?
Knowing that I thought about the fact that we can connect a keyboard to Android (yes, I try to think of everything, even the improbable).
Currently I therefore use love.keyboard.hasScreenKeyboard to differentiate but it will not work as expected if you connect a physical keyboard to your tablet for example.
I was wondering if there is a way around Löve2D to detect the presence of a physical keyboard.
Because I am currently making a game that is PC / Android compatible and I am making a menu that displays the controls, so if a Gamepad is active it displays it otherwise it displays the keys on the keyboard but if we are on a phone I would have liked to display touch controls, so is there a way to do this?
Knowing that I thought about the fact that we can connect a keyboard to Android (yes, I try to think of everything, even the improbable).
Currently I therefore use love.keyboard.hasScreenKeyboard to differentiate but it will not work as expected if you connect a physical keyboard to your tablet for example.