Share Your Code

Simple Floating Keyboard (all Corona, no native)

Posted by bpappin, Posted on October 21, 2011, Last updated October 28, 2011

Update 2011-10-27:
- several bug fixes

Download it from here:
http://dl.dropbox.com/u/62099/sglkeyboard-v1.1.zip

I'm working on a first app for Sixgreen Labs. We found it a real pain that the native inputs wouldn't work in the Simulator (although we understand why and empathize with the Corona team)

I just wrote this up because I was getting consistant crashing in the Simulator from
http://developer.anscamobile.com/code/floating-keyboard
I also didn't like the way that keyboard used a large graphic that was scaled down for portrait mode.

Features:
- It uses zero graphics, which makes it light weight and easy to scale.
- can handle multiple inputs on the same screen.
- uses a pseudo iPhone layout, which is also pretty close to a stock Android layout.

Unfinished:
- I have not handled orientation yet (it's written for portiate, but it would be easy to add).
- its a bit crufty looking.
- needs a little hysteresis for the keys (if thats even possible in corona).
- I'd like the cursor to blink.
- English only. However it would be easy to localize if needed.

It could certainly do with some improvement, so if people are interested, I'll put it under source control somewhere and attempt to maintain it.


Replies

bpappin
User offline. Last seen 1 year 48 weeks ago. Offline
Joined: 19 Jan 2011

Download is from my dropbox, so if it's maintained it will need to be moved.

projects1
User offline. Last seen 4 weeks 5 hours ago. Offline
Joined: 3 Jan 2012

Hi bpappin

I was looking for keyboard in corona when i stumbled on ur code thanks for sharing. I dont work with iphone apps but just curious this will work for both iphone and android right.

Thanks

max

bpappin
User offline. Last seen 1 year 48 weeks ago. Offline
Joined: 19 Jan 2011

Yes it should work. It's all Corona and no native, so I don't think it will have any dependencies on a particular platform.

It's pretty basic and does not include any auto-correction etc. that you would normally get with a device keyboard.

I consider it experimental code, so feel free to do whatever you like with it.

bpappin
User offline. Last seen 1 year 48 weeks ago. Offline
Joined: 19 Jan 2011

Yes it should work. It's all Corona and no native, so I don't think it will have any dependencies on a particular platform.

It's pretty basic and does not include any auto-correction etc. that you would normally get with a device keyboard.

I consider it experimental code, so feel free to do whatever you like with it.