Virtual QWERTY keyboard for LUA

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Virtual QWERTY keyboard for LUA

Post by mrn »

Here is a fast on-screen keyboard-based text input concept,
requiring only two (!) keystrokes to enter any character.

Features:
- entering ANY character by only TWO KEYSTROKES
- QWERTY (QWERTZ) keyboard layout
- based on a 7x9 char template with CapsLock Function

How does it work?
The on-screen QWERTY keyboard is divided into 7 blocks, each one with a square shape,
containing 3x3=9 on-screen buttons. The first keystroke selects such a block,

Image

while the second one does choose one of the nine chars inside this block.

- To move up/down/left/right inside the block .. the arrow keys are used
- To move up-left .. square, down-left .. cross, down-right..circele, up-right .. triangle keys used.
- To choose the mid char from the block .. the 'Select' key is used.

Installation:
Put the 'TextInputxx' dir into your 'psp/game/luaplayer/Applications/' directory. http://fosk4psp.dynamicweb.hu
This file includes only the pure character input, does not deal with text formatting.

Future plans are first to add:
- Tab, Del, BackSpace, Insert, etc. functions.
- Copy-Paste, PageUp, ScrollLeft, etc, etc.
- File browser with Open, Save, Close, etc functions.
(this all could be done by adding an extra block invoked by the X button (which is still not used)).

For developers:

..hope you know how to edit LUA-codes "online" on your PC while staying connected to the PSP.
(This let us keep running LUAPLAYER without the need to activate System>USB..
Just start any LUA app with the 'System.usbDiskModeActivate()' command inside, then exit this app,
and stay in Lowser. Now you can edit your code. For more info go to the luaplayer website, or post your question.)

Note:
on Ubuntu I need to close lua apps on the PSP BEFORE editing them on the PC
to be able to save the code onto the MS, otherwise the file gets lost from the MemStick!!!

Hope, you like this TextInput design, and will use it for future Dictionaries, Notepads and other apps.
Just do not forget to inform about your apps!!!
mrn
Last edited by mrn on Fri Dec 02, 2005 4:27 am, edited 2 times in total.
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

Menu Items Added.
Two-step on-screen tutorial helping to type fast!
Edit-like Menu points (Insert, Cut, Copy, Mark, etc.) in normal mode, while
File-related Menu points (New, Open, Close, Save, Export, PrntScr ) are planned in CapsLock mode .)

Source:
http://fosk4psp.dynamicweb.hu

Note:
having problems with escape sequences when printing them in graph. mode.
(Tabulator prints a strange square, etc..) Is it meant to be like that.?

Pls let us know your comments!
I'll give you some time now to post code to make the Menu work as mentioned above. Looking forward for your code ;)
Last edited by mrn on Fri Dec 02, 2005 4:26 am, edited 2 times in total.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

It kind of reminds me of something ... ;) (which also uses 2 key-combos)

http://forums.ps2dev.org/viewtopic.php? ... ht=psprint

But it's looking interesting. I'll be interested to convert it to Lua and make a typing tutor for it. Feel free to use as many ideas from p-sprint as you like, and perhaps we can combine the best of both worlds to make something useful for all. You may like the idea I used for control/shift/alt keys for instance.

Keep up the good work.

Arwin

(oh and by the way, something like TAB you have to deal with yourself - if you receive the TAB key, you have to, say, print 5 spaces)
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

Thanks, Arwin!!! I definitely wanted sthng which can edit files without leaving luaplayer...
and where we do not need to learn a new layout.
thats why lua, ant that's why qwerty. mrn
Last edited by mrn on Mon Nov 07, 2005 8:18 pm, edited 1 time in total.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Moved to the proper forum.
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

A new version could be downloaded from:
http://fosk4psp.dynamicweb.hu

Added Features:
- Del deletes the last char in the line
- Tab now adds five spaces to 'text'
- Xprt (LineExport) exports the note we just wrote to a file
named acc. to the date and time of saving
- Prnt (PrintScreen) stores a png in the same way as Xprt
- Blocks of size 3x3 are now visually more separable
- Clock

Pls. let me know about your feature requests,
related projects to merge with, etc.
mrn
Last edited by mrn on Fri Dec 02, 2005 4:27 am, edited 2 times in total.
Bob535
Posts: 56
Joined: Fri Nov 04, 2005 6:52 am

Post by Bob535 »

Love the project, it needs open, save, save as functions to be really worth using though.

Take a look at the Apollo text editior by Soban.
It has those functions but is not nearly as easy to use as your editor.

http://forums.ps2dev.org/viewtopic.php? ... ght=apollo
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

Bob, can you pls. send me a working version of Soban's editor?
thnx, mrn
Bob535
Posts: 56
Joined: Fri Nov 04, 2005 6:52 am

Post by Bob535 »

The one he has posted works fine, if it is giving you an error when you try to load it do this.

Deactive USB, unplug usb cable
restart your psp, load lua player and try now.
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

Arwin, feel free to put this concept (maybe as an alternative input) into your p_sprint.
I also wrote to Rob_Psp, maybe he can implement this into his texteditor, what is used by PSP PDA
http://files.pspupdates.qj.net/cgi-bin/ ... ,0,21,1692
and PSP Windows
http://psp-news.dcemu.co.uk/pspwindows.shtml

New Feature to implement
I just see a new thing to add to the Menu items right below Xprt and Prnt:
- Exec, ie dostring() as discussed here:
http://forums.ps2dev.org/viewtopic.php?p=28855#28855
..or maybe also to let the keyboard pop-up directly from the Lua enviroment?
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

Rob no more works on his Lua-based text editor in PSP Win,
but on the C-based one in PSP-PDA - wrote in his mail.
I plan to make sthng like a ch = ReadChar (key_pressed) function using this
PSP-FOSK concept. Than it'll be hopefully easy to add this functionality
to any Lua game
, editor, dict, viewer, browser, emulator, shelll..

this 'key_pressed' variable is one of the keys we press FIRST when typing,
the function pops up the online keyboard, and the SECOND keypress is then read inside this function.
The decoded char is then returned by the fnct.


.. aha. i see it is not so simple, coz the keybrd should be displayed before the
first key is pressed.. so then maybe we press a key, it pops up the keybrd,
reads a string, ... closes the keybrd..


..but then it is not easy to put it into rob's editor,
which needs the kbrd to bstay active during edtiting, even while moving the cursor,etc. then maybe the best would be two separate funct:
ch = ReadChar (key_pressed)
st = ReadString ()
(I just see the hosting page is offffffline now, but here is a mirror of the first ver:
http://psplua.com/modules/news/article.php?storyid=19
)
m.
Last edited by mrn on Fri Dec 02, 2005 4:29 am, edited 1 time in total.
mrn
Posts: 116
Joined: Wed Nov 02, 2005 2:26 am

Post by mrn »

ok. i made a new page for this thing:
http://fosk4psp.dynamicweb.hu/
(hope these guys will note me before closing...)
Post Reply