Floating Keyboard

Posted by bruno.simoes7, Posted on September 1, 2011

3 votes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
local newLabel = ...
local keys = {}  
keys["2"] = true  
keys["3"] = true  
keys["5"] = true  
keys["7"] = true  
keys[" "] = true  
keys["X"] = true  
 
require("Keyboard").newKeyboard {   
        -- Required. Object with 'setText( value )' or  
        -- 'text' properties and text size 'size'  
        inputField = newLabel,  
 
        -- Optional. Use this to override the label value  
        -- You can use this to erase  
        defaultValue = newLabel.text,   
 
        -- Optional. Cursor color  
        useCursorColor = {100, 100, 100},  
 
        -- Optional. Hide cursor  
        hideCursor = false,  
 
        -- Optional. Key press sound  
        disableSoundOnHit = false,  
 
        -- Optional. Start with CapsLock enabled  
        enableCapsLock = true,  
 
        -- Optional. Enable only a few keys  
        enabledKeys = keys,  
 
        -- Optional. Select layout, default is 1.   
        -- 1-ABC, 2-123, 3-Symb  
        useLayout = 2,  
 
        -- Landscape orientation or not.   
        -- Default: portrait  
        isLandscapeOrientation = true,  
 
        -- Optional. Keyboard position.   
        displayOnTop = false 
} 

Keyboard UI fully implemented with LUA. Find more @ Think-Techie


Replies

guruk's picture
guruk
User offline. Last seen 1 day 22 hours ago. Offline
Joined: 9 Feb 2010

very nice...
but where to download??
please provide a download link with a demo

thx
chris

bruno.simoes7
User offline. Last seen 8 hours 34 min ago. Offline
Joined: 15 Mar 2011

You can find the source code here: Google Code

JayantV's picture
JayantV
User offline. Last seen 2 hours 15 min ago. Offline
Joined: 31 Oct 2009

nice...

saved me from making one myself.

However the image looks a bit blurry on the simulator. Works fine if run on the iPad *only*, there'd be more people with the iPhone/iPod than with the iPad.

?:)

Danny's picture
Danny
User offline. Last seen 2 hours 22 min ago. Offline
Staff
Joined: 17 Aug 2011

Nice work :)

Pinback's picture
Pinback
User offline. Last seen 5 days 11 hours ago. Offline
Joined: 3 Mar 2010

I know this thread is old, but I'll try anyway. I downloaded all the file from Google Code, but all I get is a keyboard outline with no characters on the keys (clicking on the keys does seem to work, but the keys aren't labeled). The three keyboard .JPG's don't appear to be valid .JPG's... no graphics program I have will read them.

Has something about Corona changed in the last year and this just isn't going to work anymore? It is exactly what I needed, so I'd love to get it working.

Thanks...

Pinback's picture
Pinback
User offline. Last seen 5 days 11 hours ago. Offline
Joined: 3 Mar 2010

Never mind... I was finally able to get the jpg's downloaded successfully. It still has a few issues, but I'll work around those...