After a couple of days hard working I've finally finished something that with you guys: an inputfield that opens a virtual keybord when pressing it.
Hopefully someones finds it usefull.
Please tell me about bugs/improvements (also read info in InputKeyboard.lua)
Please note that it's written for "fit width" and that it only works in portrait mode.
Latest version always found at:
https://github.com/mathz/InputKeyboard
Comments
Do you mind putting this in Github, so others can also benefit from it? Once you do that, I'll add your link to our dev FAQ so it'll (hopefully) be widespread.
Excuse my somewhat confusing text. I got so excited when i pulled this off that I wrote a little bit to fast :P
It should be more something like "After working hard a couple of days I've finally got something that I would like to share with you guys"
I'll put it on GitHub ASAP, could take some time tough, since I've never used GitHub before.
This dramatically decreases total file size and also easier to make internationalizations of the keyboard.
Likes: talis
nice lib!
congratz.!
www.tntengine.com
Hopefully someone will find a use for it.
Next version will contain some sort of rudimentary localization routine.
Now with ttf it becomes all programmatic. I am not a good designer so loved the second update.
Thanks again.
I got nightmares from all that hours I spent making those images for all resolutions as perfect as possible so I'm happy that you dont have to go through that also
I dont know if the included font (arial) contains cyrillic letters. If not you have to change font and that means two things:
1. You might need to change the fontsize
2 I've edited the font to contain the "icons" uppercase,lowercase,delete and enter. You must do the same in whatever font you use.
I'm currently working on making some localization - primarily the possiblity to change keyboard layout to fit different locales.
At the moment I'm developing an app which will use this keyboard.
The app itself could have a quite big potential for success in Russia, therefore i would greatly appreciate if you share any changes you do to make the keyboard work in russian.
Localization feature added. Example keyboards in english, german, swedish and for @talis also russian included.
It's also possible to change keyboard layout during runtime.
List of changes: https://github.com/mathz/InputKeyboard/wiki/History
@gorkem: Thankyou for adding the github link to the dev FAQ!
Thanks again you saved me from really lots of hard work.
=D>
Another version online.
The biggest changes:
1. Alternative characters when pressing a key for a longer time (for example: press "e" and you can choose "é")
2. Auto delete more characters when holding "DEL"-key.
No new updates will be done for a while if no specific bugs shows up, I need to concentrate on other parts of my app
Likes: talis
Thanks in advance
Thanks in advance
local keyboard = KeyBoard.new("en_GB")
to
local keyboard = KeyBoard.new("de_DE")
or if you want to change the keyboard on an event use:
keyboard setLang("de_DE", true)
Current support keyboards are
"sv_SE" (swedish)
"de_DE" (german)
"en_GB" (british english)
"ru_RU" (russian)
It is however fairly easy to change and/or add keyboards. Just look at the current keyboard files in the "locale"-directory - that will give you an idea how to create your own keyboard or if you want to change an existing one.
Mann kan "tastatur-sprache" wechseln
Es gibt ein kleine erklärung in InputKeyboard.lua wie alles funktioniert, aber in moment habe leider keine zeit eine genauer dokumentation zum machen.
Hopefully that's understandable, my german is not as good as it should be
i didn't undertand it
If it is your first real attempt , you are really wonderful.
i didn't undertand it
If it is your first real attempt , you are really wonderful.
I only wrote that your question is not stupid! and that the localization feature means that it is possible to change to different keyboard layouts depending on the users localization.
For example, a swedish person (like myself) would probably prefer a swedish keyboard layout and a russian would prefer a russian layout.
I also wrote that there is a small explanation inside the file InputKeyboard.lua about how it works.
And yes, it is my real first attempt to make something more advanced in lua/gideros, so thank you for your kind words
Thanks for sharing!
You could also add a few screenshots in your original post to boost the downloads and get more feedback.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
@OZApps : You are correct, that is better. I've uploaded a new version to github now, thank you!
http://www.giderosmobile.com/forum/discussion/1758/attempt-to-index-global-039scenemanager039-a-nil-value-problem#Item_5
Thanks in advance.
The img-folder contains all images realted to the keyboard in different resolutions.
All in all there are 6 images per resolution.
These are used in the KeyBoard.lua file, not the main.lua file.
The InputKeyboard uses 480x800 as the base-resolution. Therefore it is adviced that your app also uses that. However you can use another resolution, but then you have to adjust the image scales properties accordingly.
Please make sure that all images exists in your img-folder and that the project properties contains all image scales you want to you (these are present in my project on github).
If you still have problems after this, please send me your entire project and I'll have a look at it.
I downloaded Inputkeyboard and found very useful and it works great on portrait mode..
Thanks a lot for sharing...
Have you found any solution, to work it in Landscape mode...
I'm developing a project which is in Landscape mode, but I want to implement your's Inputkeyboard in my project, as it fills my requirements...
Any new release which supports landscape mode?
Thank you... :-?
Thankyou for using my keyboard
I have unfortunately abandoned Gideros since I got tired of having to invent the wheel over and over again (for example having to do something as fundamental as a keyboard).
I took a quick look at my old code and what you could do to get started is on lines 523-534, 653-659 changing all occurrences of
getLogicalHeight to getLogicalWidth
getLogicalTranslateY to getLogicalTranslateX
getLogicalScaleY to getLogicalScaleX
getLogicalWidth to getLogicalHeight
This will make it possible to use i landscape mode, BUT more changes have to be done to make it also look good.
Hopefully this is enought to get you started
Thank you for your reply...
I'll do the changes and try it to work in landscape mode...
Will let you know my progress after giving a try to it...
Thank you so much...
I've made those changes, and it works....
As you told more changes have to be done to make it look good... Will try for that, Right now For my project I just wanted number keyboard, from "0-9" with a "." and a "backspace", I'll try to create it by referring your code... Please help me out with your suggestion, to build this simple number keyboard which must works with inputbox.. I'm new to lua...
Thank you..