PDA

View Full Version : NDS: BLARGH Text Editor



anomalous_underdog
April 7th, 2008, 21:43
Hi. If any of you own a Nintendo DS, I made an on-screen keyboard using hex-shaped keys instead of rectangular ones. It uses the QUONG layout made by http://www.strout.net/info/ideas/hexinput.html

If you're familiar with the FUNADY keyboard layout for the palm PDA, its kinda like that.

from the hexinput article:

You can input a letter by tapping it, or by dragging to it from a neighboring letter.
Letters are arranged in a hexagonal grid so that every one has six neighbors, and all neighbors are equally easy to reach.
Letters are arranged to optimize text input in a particular language (English, in this case).



http://i289.photobucket.com/albums/ll222/anomalous_underdog/NDS%20Homebrew/quongTest-1.jpg

http://i289.photobucket.com/albums/ll222/anomalous_underdog/NDS%20Homebrew/QuongKeyboardDSr41.png



http://anomalousunderdog.blogspot.com/search/label/QuongKeyboard

project page: http://sharesource.org/project/blarghtexteditor/


ok, as for the limitations:

its only a demo, you won't be able to save/load the typed text (although I will use this program to make an actual text editor)
shift and caps lock do not work yet
there is no vertical scrollbar yet. if you type too far, you'll end up writing text on top of the on-screen keyboard
the vertical scrolling of text still has bugs: it will not work properly with word-wrapped lines & the last line of text gets duplicated when you scroll down (other than that, its working fine)
the text cursor doesn't blink yet
the upper screen is currently used for debug. in the future, that area will be used as non-monospaced text display too
cut, copy, paste of text not yet implemented
no unicode support yet
the other buttons in the gui do not do anything yet; they are conceptual
no word-wrap yet
moving text cursor up still has bugs
moving text cursor down does not work yet
moving text cursor left and right when you are either at the end or beginning of a word-wrapped line still has bugs
the non-monospaced text display is still unoptimized: when typing or pressing backspace in the middle of the text, the screen will flicker. this is because I clear the area of the screen occupying the text display and redraw the whole text everytime
the code mistakenly detects hex button presses out of range
the spacing between some letters is not optimized yet (like f)
in the font: 1 (the number one) and l (small letter L) look like each other too much. I will edit the font for this. same for 0 (number zero) and O (letter O)
if you put the stylus on the border of two hex buttons, it will alternate between them too fast
if you put the stylus on the border of a hex buttons, it will be pressed too fast



if any of you experience any crashes, tell me.

current release: revision 120

nds file:
http://dl.sharesource.org/blarghtexteditor/blarghtexteditor.nds.r120.zip

some notes:
Preliminary File Save/Load Dialog Box created. It doesn't do much besides showing your top level files and selecting them; its a work in progress. Press select to toggle the file save/load dialog box.

In other news, I'm gonna start learning how to drive tomorrow! Wish me luck.

Akoi Meexx
April 8th, 2008, 18:32
I remember reading about HexInput, and someone was saying it would be great for use on the DS. The layout's awkward at first, but definitely worth trying. Maybe include settings that can be written to an INI to flip between QWERTY and HexInput?

Other than that, I like the layout. If you ever need any graphics done for it, I'd love to pitch in and help.

anomalous_underdog
April 8th, 2008, 18:58
I used to own a palm m130 PDA for 4 years, so I'm used to those unfamiliar keyboard layouts. When I bought the DS and tried out homebrew for the first time, I was surprised to see that they were all using QWERTY. So I made this as a demo.

I forgot to mention, I'm encouraging other homebrew developers to add this kind of on-screen keyboards in their homebrew apps too.

Source code is in GPL v3 and available as a 7zip archive at:
http://dl.sharesource.org/blarghtexteditor/quongkeyboardds.r62.7z


I'm planning to add scripting functionality either by Lua or Python, and yes, I've considered the feature of switching keyboard layouts. I'm thinking it should be so users can easily make their own keyboard layouts by simply adding/editing some script files.

Thanks for the graphics offer, maybe when things get really busy I'll need all the help I can get. The graphics I made are just pixel-art style versions of icons in this theme (http://tango.freedesktop.org/Tango_Icon_Library)

The next things that'll need additional GUI layout designing is the file save/load dialog box, and the main menu. But I have a lot of coding to do before that.

Akoi Meexx
April 8th, 2008, 19:11
I used to own a palm m130 PDA for 4 years, so I'm used to those unfamiliar keyboard layouts. When I bought the DS and tried out homebrew for the first time, I was surprised to see that they were all using QWERTY. So I made this as a demo.

I forgot to mention, I'm encouraging other homebrew developers to add this kind of on-screen keyboards in their homebrew apps too.

Source code is in GPL v3 and available as a 7zip archive at:
http://dl.sharesource.org/blarghtexteditor/quongkeyboardds.r62.7z


I'm planning to add scripting functionality either by Lua or Python, and yes, I've considered the feature of switching keyboard layouts. I'm thinking it should be so users can easily make their own keyboard layouts by simply adding/editing some script files.

Thanks for the graphics offer, maybe when things get really busy I'll need all the help I can get. The graphics I made are just pixel-art style versions of icons in this theme (http://tango.freedesktop.org/Tango_Icon_Library)

The next things that'll need additional GUI layout designing is the file save/load dialog box, and the main menu. But I have a lot of coding to do before that.

Yeah, thought I recognized Tango. Scripted (keyboard) layouts would be a great feature, definitely sounds like you've got a lot of coding ahead of you. Good luck, and I'll post about how this runs on the CycloDS Evolution when I get home.

anomalous_underdog
April 14th, 2008, 17:20
BLARGH Text Editor rev81 now released:
- shift and caps lock now werks
- vertical scrolling of text works (but has bugs for word wrapped lines)

Akoi Meexx
April 15th, 2008, 05:28
So far runs smoothly on my CycloDS Evolution! I'm in the works of building a DSPidgin application, and the more I use this layout the more I think it makes sense to have in an IM client... and the more I think it makes sense to have a keyboard plugin architecture set up.

Maybe when you hit select to hide the debugging mode, you could expand the text editing area to fill the top screen as well as the lower portion? Other than that, once this has the basic text editing features that you have buttons available for, this will be my 2nd most used editor on the DS.
(DSLinux takes the first with Vi, but that gap is closing with this one)

Hope to see more from you man, you rock. :cool:


Edit: Oh, b'dur. You have that listed in your list of things not yet implemented. Haha, it's late and I'm tired.... :P

anomalous_underdog
April 15th, 2008, 09:49
So far runs smoothly on my CycloDS Evolution! I'm in the works of building a DSPidgin application, and the more I use this layout the more I think it makes sense to have in an IM client... and the more I think it makes sense to have a keyboard plugin architecture set up.

Maybe when you hit select to hide the debugging mode, you could expand the text editing area to fill the top screen as well as the lower portion? Other than that, once this has the basic text editing features that you have buttons available for, this will be my 2nd most used editor on the DS.
(DSLinux takes the first with Vi, but that gap is closing with this one)

Hope to see more from you man, you rock. :cool:


Edit: Oh, b'dur. You have that listed in your list of things not yet implemented. Haha, it's late and I'm tired.... :P

I would have used vi in dslinux too, but I forgot the shortcuts, so I use the text editor in DSOrganize for now.

You're gonna port Pidgin to ds? So you'll use libpurple then? Wouldn't that be hard? Since it uses glib, either you'll have to port glib to the ds too, or replace the parts that make use of glib (but maybe it wouldn't be hard, I guess I don't know)

I had been thinking of making an IM client for DS too, using Centericq

Akoi Meexx
April 15th, 2008, 14:23
I would have used vi in dslinux too, but I forgot the shortcuts, so I use the text editor in DSOrganize for now.

You're gonna port Pidgin to ds? So you'll use libpurple then? Wouldn't that be hard? Since it uses glib, either you'll have to port glib to the ds too, or replace the parts that make use of glib (but maybe it wouldn't be hard, I guess I don't know)

I had been thinking of making an IM client for DS too, using Centericq

Well, they have libFinch available as well, but either way has been a bit of a bog-down for me. I'm the kind of geek that usually likes to start from scratch with his own code so he knows where everything is.

CenterICQ looks interesting, and if I really wanted to strip down the messenger I could just use naim as a starting point.

anomalous_underdog
April 15th, 2008, 14:39
Well, they have libFinch available as well, but either way has been a bit of a bog-down for me. I'm the kind of geek that usually likes to start from scratch with his own code so he knows where everything is.

CenterICQ looks interesting, and if I really wanted to strip down the messenger I could just use naim as a starting point.

Isn't Finch merely a frontend to libpurple? Its the console-based frontend to libpurple, the same way Pidgin is the GUI frontend to libpurple. You'll be wanting to look into libpurple instead of Finch or Pidgin for the internals of an IM client.

I'll be sure to check out naim too, although it seems it doesn't support the yahoo messenger protocol (I need it; most of my friends are using yahoo).

Centericq also reportedly has SMS sending functionality, which I also need. Haven't tried it yet though.

ok wait, wikipedia says Centericq isn't actively maintained anymore.

It says CenterIM is based on Centericq, and has bugfixes and whatnot. Better take a look into that instead of Centericq.

http://www.centerim.org/index.php/Main_Page

Akoi Meexx
April 17th, 2008, 17:58
Isn't Finch merely a frontend to libpurple? Its the console-based frontend to libpurple, the same way Pidgin is the GUI frontend to libpurple. You'll be wanting to look into libpurple instead of Finch or Pidgin for the internals of an IM client.

Completely right, so it wouldn't really help to start there in any case. I did see that CenterICQ was no longer being maintained, but either that or the CenterIM project look like good starting points.

Also, I put together an xml file along with old keyboard images as an idea for how one could make additional keyboard plugins. I haven't specified the key positions or sizes in the xml, but just included the tags figuring those should be fairly self-explanatory. Any thoughts or suggestions on it?

anomalous_underdog
April 17th, 2008, 20:04
Also, I put together an xml file along with old keyboard images as an idea for how one could make additional keyboard plugins. I haven't specified the key positions or sizes in the xml, but just included the tags figuring those should be fairly self-explanatory. Any thoughts or suggestions on it?
I don't want to sound ungrateful but, I'm thinking of not using XML files at all.

I'm gonna use actual script files themselves as the keyboard layout definition (.lua in my case as I've decided to use Lua). What I'll do is, there's a lua table that declares all the keys, where they are on the screen, and a callback function attached to each. When a key is pressed, that callback function gets called, which would normally return a single letter, but this lets me do stuff like making a key output the current date and time, which is what the blank keys on the far left are for (in my program). Its quite similar to the XML file you made actually.

I had originally been thinking each key have its own .png file so users can rearrange the layout on the fly, but maybe one big keyboard .png file may be easier (like in the ones you provided, and besides, its also how I do things currently).

In your QWERTY layout pic, I can see a forward slash "/", but I can't seem to find backslash "\", also tab, bar "|", tilde "~", and backquote "`" (although the last three might not be that important).

I'm also gonna make a "character map" keyboard layout. Its like the Character Map program for Windows, a table of chars including accented letters and those wierd engineering/math symbols.

I might also put in the FITALY layout, I used to use that when my PDA was still working.
http://www.fitaly.com/

Here's some weird page I found about alternative keyboard layouts (its in Japanese though, I just look at the pictures):
http://pitecan.com/articles/HIS/InputSurvey/inputsurvey.html
http://mrl.nyu.edu/projects/quikwriting/Quikwrite2.html

Akoi Meexx
April 18th, 2008, 02:45
Nothing ungrateful about that. Good to hear your take on how you'd implement it, really. :)

antiaverage
April 23rd, 2008, 17:57
I'm not sure a character map is the best way to input foreign characters. Have you looked into how Apple uses the option key for this? Also, why FITALY instead of QUONG? It seems FITALY is optimized for single presses whereas QUONG is optimized for strokes as desired by the creator of HexInput.

Akoi Meexx
April 23rd, 2008, 19:09
I'm not sure a character map is the best way to input foreign characters. Have you looked into how Apple uses the option key for this? Also, why FITALY instead of QUONG? It seems FITALY is optimized for single presses whereas QUONG is optimized for strokes as desired by the creator of HexInput.

I thought that he meant in addition to QUONG, which is already in use here?

antiaverage
April 24th, 2008, 02:16
I thought that he meant in addition to QUONG, which is already in use here?

As an addition that makes perfect sense. Sorry about that. I'm still curious about the foreign characters, though. I'd prefer option-key style input over a character map.

Also, turns out OPTI is 5% faster than FITALY, but very similar in layout. You may want to consider it instead:
http://www.yorku.ca/mack/CHI99a-f4.jpg (http://www.yorku.ca/mack/CHI99a.html)
http://www.yorku.ca/mack/CHI99a.html

anomalous_underdog
April 28th, 2008, 16:45
Also, turns out OPTI is 5% faster than FITALY, but very similar in layout. You may want to consider it instead:
http://www.yorku.ca/mack/CHI99a-f4.jpg (http://www.yorku.ca/mack/CHI99a.html)
http://www.yorku.ca/mack/CHI99a.html

hey, thanks a lot for pointing that out, FITALY is commercially owned, so I was having doubts whether I should include it in my program or not.

since OPTI seems to be an academic research paper, its creators may be more willing to let other people use it.

I'm also thinking of adding Quikwrite. http://mrl.nyu.edu/projects/quikwriting/Quikwrite2.html



I'm still curious about the foreign characters, though. I'd prefer option-key style input over a character map.


Yes, I'm thinking about it too. I'm only planning on putting the character map option so users can input any conceivable character allowed in unicode (but perhaps not kanji or other similar foreign language letters. I heard their letters are something like a million or more in total).

as for typing of foreign letters in daily usage, I'm still thinking about it.

anomalous_underdog
April 28th, 2008, 17:22
revision 97 released!

nds file:
http://dl.sharesource.org/blarghtexteditor/blarghtexteditor.nds.r97.zip

source code:
http://dl.sharesource.org/blarghtexteditor/blarghtexteditor.src.r97.zip

notes:

a few bugfixes, although there are still a handful of bugs
after typing an amount of text, press the bottom-left hex. it'll print some info about the lines of text currently displayed. those are the line data. I'm about to refactor some of the text editing code to make use of that data

anomalous_underdog
May 4th, 2008, 20:19
revision 103 released!

nds file:
http://dl.sharesource.org/blarghtexteditor/blarghtexteditor.r103.zip
http://www.zshare.net/download/11528400d5b3077e/

source code:
http://dl.sharesource.org/blarghtexteditor/blarghtexteditor.src.r103.zip

notes:

bugfixes. text editing should have no bugs now
i'm currently working on implementing proper word-wrapping, its incomplete, so I didn't include it in the release

antiaverage
May 4th, 2008, 23:19
Keep it up, I can't wait for this thing to save and load ^_^

Karzahnii
May 8th, 2008, 23:48
BLARGHText is only for a R4-supported DS, right? Can the save/load option open files from inside the R4?

Akoi Meexx
May 9th, 2008, 04:58
BLARGHText is only for a R4-supported DS, right? Can the save/load option open files from inside the R4?

Save and Load are not implemented yet, and it runs on a CycloDS Evolution as well as an AceKard 2. Anyone else willing to test multiple carts should post here, methinks. :P

antiaverage
May 18th, 2008, 03:06
Save and Load are not implemented yet, and it runs on a CycloDS Evolution as well as an AceKard 2. Anyone else willing to test multiple carts should post here, methinks. :P

Pretty sure if read/write is implemented (load/save) it will use DLDI, so any DLDI supported card. This includes R4, CycloDS, AceKard2, and many many more. Here's a non-comprehensive list:
http://chishm.drunkencoders.com/DLDI/

Akoi Meexx
May 18th, 2008, 03:33
Pretty sure if read/write is implemented (load/save) it will use DLDI, so any DLDI supported card. This includes R4, CycloDS, AceKard2, and many many more. Here's a non-comprehensive list:
http://chishm.drunkencoders.com/DLDI/

Let me clarify, I meant in general, not in reference to whether or not Saving/Loading works on particular flash cartridges. :)

Any news about how BLARGH is is coming along? I'd hate to see this project die.

anomalous_underdog
July 30th, 2008, 14:37
sorry for the sudden abatement of updates. work happened.

and it still is, so updates will be slow. anyway, this is what I'm working on right now:

http://i289.photobucket.com/albums/ll222/anomalous_underdog/NDS%20Homebrew/quongFileSave.png

If it feels too cramped, don't worry. There'll be a button to toggle the File Save Dialog box so it gets displayed on the upper screen instead.

Akoi Meexx
July 30th, 2008, 20:17
Is that from 103? I'm at work yet myself and can't test until I get home.

anomalous_underdog
July 31st, 2008, 19:53
No, sorry. Revision 103 doesn't have this. I'm still working on it, and I haven't released anything yet so far.

Jeric
August 3rd, 2008, 17:55
anomalous. If you can get this to work. you will be my freaking hero. So far its a solid editor, though I have to get used to the new layout it DOES seem easier for the enviroment.

anomalous_underdog
September 20th, 2008, 12:02
well its certainly been a long time. Got a problem right now, still learning how to use hardware sprites on the DS. If anyone knowledgeable is willing to help, here's my forum post: http://forum.gbadev.org/viewtopic.php?t=16063

Jeric
November 2nd, 2008, 02:57
Anything new to report Anomalous?

anomalous_underdog
November 2nd, 2008, 03:42
Anything new to report Anomalous?

no I've been busy with other projects. tell you what, I guess I should start moving my lazy ass and get back to working on this instead =) heck, there've been times when I needed to jot down something, wished this text editor was finished too

Jeric
November 2nd, 2008, 03:50
Not trying to pressure you, but this would be dead useful, and its aesthetically pleasing (bonus points if you include a method of editing the GUI in the version AFTER you get core functionality done).

anomalous_underdog
November 3rd, 2008, 11:27
hey there. revision 111 released.

no save/load yet
the scrollbar to the right now works (with some minor bugs)


nds file:
http://dl.sharesource.org/blarghtexteditor/blarghtexteditor.nds.r111.zip

source code:
http://dl.sharesource.org/blarghtexteditor/blarghtexteditor.src.r111.zip

Jeric
November 16th, 2008, 04:16
Noted no bugs as yet on the scroll bar (apologize for the late feedback, but nano has ate my soul).

Mycow
January 24th, 2009, 00:32
I was searching for a good DS text editor on google for hours and then I finally found this. That's a great text editor!!
I'm looking foward to further revisions and save/load functions, keep up the good work!:)