Keyboard without the visual keyboard?

So I was wondering; is it possible to get events or similar from a keyboard, without forcing it to view with showKeyboard().
I do not know if Codea supplies with a event system, but actually it would be weird if they didnt.

So what my idea is, if you got like a external keyboard then you can use it to do special things.
In most games, this would be bad concidering a small amount of people is actually using a external keyboard to their iOS device, wich would create unfearness.

But is there a way? I have not looked into events yet, but I figured you guys might help me better then if I go and get confused while looking at the wiki.

Thanks for reading!

If you have a bluetooth keyboard hooked up, it doesn’t show the onscreen keyboard, it just takes what you type. So there’s no worries on that score. I guess the question is whether you can detect key presses without having a “textbox” or some such for the focus to be in. Interesting question… I shall have a play some time.

@spacemonkey
Yea well I do got a bluetooth keyboard, and so if I use keyboardBuffer (or whatever its called) it will only change if I have done a showKeyboard().
Other engines I have tried got a keyboard function, doe for a pc keyboard is pretty optional.

I just want to know if theres a way to get responds from a keyboard, without showing it.

If you can get it work, then it should allow you to use the iCade or the iCade 8Bitty to control your games as they (IIRC) work just like Bluetooth keyboards and send keycodes when you press a button.

@TechDojo
How do you mean? Like to simulate a button press? I do not know what iCade 8Bitty is, I’ll google it but could you give me some examples or breifly explain it?
If you prefer me lerning via google then you don’t need to say anything, so to speak.

@akaJag if you call showKeyboard() and a bluetooth keyboard is paired with your iPad, then Codea will not show the software keyboard. It will receive input via the keyboard(key) function, and hideKeyboard() can be used to disable keyboard input.

Just to repeat: showKeyboard() will not show a virtual keyboard if you have a bluetooth keyboard paired. It will just enable keyboard input via the keyboard(key) function.

@Simeon
So If I understand you correctly; if I do showKeyboard() and hideKeyboard() in combo the visual keyboard will not show but it will still give me a response?

Currently I have a bluetooth keyboard connected, so Ive seen that its hidden when I do showKeyboard(). Also is there a way to know if you got a external keyboard?

i think there is no way to identify, if and which external accessory is connected.
also, only software keyboard keys are supported. so you cant catch ESC, F1… or other “modefier” keys

@akaJag that’s not quite what I meant. If you call showKeyboard(), and a bluetooth keyboard is connected, then you will not see a visual keyboard.

I’m a bit confused by your original question, “I just want to know if theres a way to get responds from a keyboard, without showing it.

You can do this with a bluetooth keyboard, as you have discovered. Obviously you can not get a response from a software (visual) keyboard without showing the keyboard. Can you clarify what you want to do?

@se24vad I see, that does make this a lot more complicated…
@Simeon Yes so when I wrote that I did not entirely think it trough. But what I mean is if I can get info from a external keyboard without having to do showKeyboard(). This would not be a problem if there was a way to detect if you are using the built in one. Ex: if keyboard.external then showKeyboard() end
That would give me “access” to the keyboardBuffers.