forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Virtual QWERTY keyboard for LUA

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Wed Nov 02, 2005 2:47 am    Post subject: Virtual QWERTY keyboard for LUA Reply with quote

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,



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
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Wed Nov 02, 2005 7:24 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Wed Nov 02, 2005 7:32 pm    Post subject: Reply with quote

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

http://forums.ps2dev.org/viewtopic.php?t=2913&highlight=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)
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Wed Nov 02, 2005 9:22 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Thu Nov 03, 2005 9:24 am    Post subject: Reply with quote

Moved to the proper forum.
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Sun Nov 06, 2005 8:44 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Bob535



Joined: 04 Nov 2005
Posts: 56

PostPosted: Mon Nov 07, 2005 3:45 am    Post subject: Reply with quote

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?t=3192&highlight=apollo
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Mon Nov 07, 2005 8:16 pm    Post subject: Reply with quote

Bob, can you pls. send me a working version of Soban's editor?
thnx, mrn
Back to top
View user's profile Send private message
Bob535



Joined: 04 Nov 2005
Posts: 56

PostPosted: Tue Nov 08, 2005 1:40 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Fri Nov 11, 2005 12:35 am    Post subject: Reply with quote

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/cfiles.cgi?0,0,0,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?
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Sun Nov 20, 2005 5:06 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mrn



Joined: 02 Nov 2005
Posts: 116

PostPosted: Fri Nov 25, 2005 4:59 am    Post subject: Reply with quote

ok. i made a new page for this thing:
http://fosk4psp.dynamicweb.hu/
(hope these guys will note me before closing...)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group