CHDK - virtual keyboard - testers needed! - page 3 - General Discussion and Assistance - CHDK Forum supplierdeeply

CHDK - virtual keyboard - testers needed!

  • 150 Replies
  • 31439 Views
Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #20 on: 02 / January / 2012, 12:25:24 »
Advertisements
Hah:D I'm working on the same currently, lol! I'll look into your code soon but at the moment I got to go... Is this modular? I'm going to do a separated .flt module for virtual keyboard.

This way no changes in CHDK core (gui.c, gui.h and so on) will be needed. And modules work quite good at now.

I think about modular code like this:

Code: [Select]
gui_handler GUI_MODE_TBOX =
    /*GUI_MODE_TBOX*/       { gui_virtkeyboard_draw,    gui_virtkeyboard_kbd_process,   gui_virtkeyboard_menu_kbd_process, 0, GUI_MODE_MAGICNUM };

instead of:
Code: [Select]
static enum Gui_Mode    gui_tbox_mode_old;

I have no time for longer answer at the moment due to low-battery in laptop and no power source here... Regards!

PS. I'll maybe change your code to modular way. I have good module code pattern prepared for my virtual keyboard and I can copy your code to this. I guess it'll be easy to do;)
« Last Edit: 02 / January / 2012, 12:37:24 by outslider »
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #21 on: 02 / January / 2012, 12:36:33 »
It's not modular (the message box is also not modular). Also is it not a keyboard, it is like a message box with input field (and keyboard).
For an "extra" keyboard look my first post. But I will make it usable for other things (texteditor ...) as soon as possible.
I think you can make it modular like the games (it doesn't look hard).

Edit:
@outslider: I was writing my answer before you finished writing yours, but it's a good idea.  :D
« Last Edit: 02 / January / 2012, 12:39:40 by TobiMarg »

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #22 on: 02 / January / 2012, 12:44:09 »
By keyboard I was thinking about both: keyboard-itself and text field. And it seems that your code do this?

Ok - so you could repair and enhance typing and I'll try to focus on making it modular, ok?

Thank you for your work;) I was worry that I will have to write whole staff by my own!

PS. Strange battery indicator... It says I have 0 power on battery... And it is still working!
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #23 on: 02 / January / 2012, 12:53:51 »
By keyboard I was thinking about both: keyboard-itself and text field. And it seems that your code do this?
Actually you can't use the keyboard alone, whitout the box.

Quote
Ok - so you could repair and enhance typing and I'll try to focus on making it modular, ok?
Ok, but if you want you can help me.

Quote
PS. Strange battery indicator... It says I have 0 power on battery... And it is still working!
Its strange, but :D :D :D I have a power source.
« Last Edit: 02 / January / 2012, 12:59:36 by TobiMarg »


Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #24 on: 02 / January / 2012, 12:59:48 »
Quote
Ok, but if you want you can help me.

It would be pleasure and I will, when I move it to modular;) I'm reading your code and I can see much good work in it. I hope I will move it to module today. I'll also add a Lua command to easy run keyboard from script but it will be done in a few days.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #25 on: 02 / January / 2012, 13:14:14 »
It's really if  you can make it modular and I hope you see not much bad code (if you see it please fix it).
Do you know if a modular thing is also compatible with the standard CHDK?

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #26 on: 02 / January / 2012, 15:04:20 »
CHDK have now two official branches:

- stable release 1.0 which is compiled in autobuild and there should be no big changes in it. Most of changes should be bugfixes;
- experimental release which is designed to provide new features, big code rewrites and changes.

Experimental release is now the trunk. So when you download the lastest source from trunk you download new, modular CHDK.

Our keyboard should go to the experimental branch. Modules are not (and will never be) compatible with release 1.0. But makeing keyboard compatible with experimental release would be good step into the future, I guess.

EDIT

OK - there is a little progress - I'm able to compile and run this virtual keyboard as a module. But there are some problems at the moment. But I'll keep working on it tomorow. And then I'll post files with source and compiled module.

If you'll change something in code that you have posted above please post diffs rather than new code - I'll need to see changes rather than whole files:D
« Last Edit: 02 / January / 2012, 17:02:02 by outslider »
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #27 on: 03 / January / 2012, 04:59:28 »
Current trunk is already include flt modules. It is almost compatible with release_1_0.

reyalp-flt branch contain several significant improving and will be commited to main trunk in near future.
One of change it that no more common gui table exists (and so slightly more incompatible with release_1_0). Please look https://trac.assembla.com/chdk/changeset/1513.
[2outslider: please note that gui handler structure slightly changed there]

Virtual keyboard surely will go to experimental branch. And my vote - it should be module. It is not often to use this feature, so no reason to keep it always .
No problem if it is integrated into core now. I will assist to separate it as correct module when it become stable.
It should be runnable system module with parameters (see fselect, palette). It could return string via char[] array in the core or (more preferable) just allocated string.

Mbox kept in the core because: a) it used everywhere in system; b) it required to correct work of core (a lot of messages are produced there and so if something wrong with modules/no module CHDK still is able to make most of its functionality).


Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #28 on: 03 / January / 2012, 07:06:45 »
I'm basing on 1522 and I'm doing this with new gui handler structure (I guess).

I also think it has to be a module. And modular code is almost done, I hope I'll do this today and post here. Then I will be appreciate, if you'll take a look on it.

I'll read fselect and palette code, I was basing on callendar, but it does not provide parameters setting;)
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #29 on: 03 / January / 2012, 16:03:11 »
And here's the code that is a first step to make it modular. I hope that one of devs could look into it to check weheter I go in a good direction.

Zip contains gui_tbox.h, gui_tbox.c and compiled module.

Regards!
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

 

Related Topics