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

CHDK - virtual keyboard - testers needed!

  • 150 Replies
  • 19556 Views
CHDK - virtual keyboard - testers needed!
« on: 14 / December / 2011, 17:31:55 »
Advertisements
Hello!

Since I've done my little drawing add-on I like to back now to my text editor. This script is now the only thing, that gives us posibility to write a text on camera. But there are more situations, that typing could be usefull. This include:

  • renaming files/directories
  • creating files/directories
  • adding user comments to photos (e.g. to EXIF
  • others?

There was a thread about virtual keyboard but it died around 2008 and gave no significant results.

I'm sure, that typing style that is used in my editor is enough convenient and can be used for other purposes. But at the moment it is implemented only as a part of the script.

This script is a little bit complicated and it would be not easy to separate writing functions from this code to place them to LUALIB. I could rewrite this code and provide such independent Lua module with next major realase of the Edi (3.0). But this way typing would be possible to be used only in other scripts. So all aforementioned applications would have to be done only as scripts.

In my opinion it would be better to add some basic typing code to source code, which coud be then used in two ways:
  • new applet - virtual keyboard - could use this functions to provide an gui element for typing while CHDK needs this (e.g. rename file)
  • new lua function/module that could use this functions to provide an typing possibility in scripts (usefull for editor, but also for e. g. intervalometers - user could set one description for a whole photo serie

Other way is just to provide a virtual keyboard, that could be loaded either from CHDK source or from Lua. And I prefer this.

Before I start I need your opinions about this project. What do you think about this typing style, which is used in Edi? I'm using it very often and I think it's OK, but somebody might have better ideas.

I think, that I could write virtual keyboard code, which would increase binary size only a little.

Also - probably I would need some help from C programmers and devs with CHDK-code knowledge to make clean, safe and stable code.

I'm waiting for opinions;)
« Last Edit: 07 / January / 2012, 15:46:28 by outslider »
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

*

Online reyalp

  • ******
  • 11747
Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #1 on: 14 / December / 2011, 23:29:20 »
But there are more situations, that typing could be usefull. This include:
  • renaming files/directories
  • creating files/directories
  • adding user comments to photos (e.g. to EXIF
  • others?
I agree with this. I think having the basic parts in C code would be good. With modules, there is less worry about "bloat" for a feature that people probably won't use very much.

I don't have more specific feedback at the moment but I'll try to think about it.
Don't forget what the H stands for.

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #2 on: 15 / December / 2011, 07:45:42 »
Before I start I need your opinions about this project. What do you think about this typing style, which is used in Edi? I'm using it very often and I think it's OK, but somebody might have better ideas.

Nice project.

I do like the way how keyboard is emulated in EDI.
 And I could easily imagine how to implement something like dialogbox to enter/edit string. This is already will be very useful.
But make it integrable into editor [require: no mbox, adjustable onscreen positions of helper and string, specific modes (insert words, newline), should be interrupted with transfer to editor when press different keys(like up-down) ] is much harder. And moreover make it reasonable universal and simple.

BTW: I also like that I could easily change mapping of symbol in EDI now. So I think that it is good if list of modes and mapping will be configurable with simple text.
« Last Edit: 15 / December / 2011, 07:47:45 by tsvstar »

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #3 on: 15 / December / 2011, 08:04:45 »
Quote
With modules, there is less worry about "bloat" for a feature that people probably won't use very much.

I'm waiting for modules;) This is brilliant idea and will help all the people, that want to enhance CHDK not only by scripts.

Quote
But make it integrable into editor [require: no mbox, adjustable onscreen positions of helper and string, specific modes (insert words, newline)
I'm thinking about keyboard that will be only a one line at the bottom of the screen, almost like keys are described in EDI statusbar. And It should return each chosen character, so position of the cursor will be placed by edi.. Well... I do not how to describe this idea;)

I'll try to make some demo of my idea in script with use of drawings. This demo will only show the mode of action of my idea and then we can start thinking about c-coding it to CHDK source.

Quote
So I think that it is good if list of modes and mapping will be configurable with simple text.
I believe this could be possible. But at the begining we can hard-code the keymap (as it was done in early releases of Edi) Maybe it's good idea to add directory A/CHDK/CONF and place there all configs, like CCHDK.CONF, scripts parameters and other things?
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick


Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #4 on: 16 / December / 2011, 11:18:33 »
Hi

I'm new in this forum and from Swizerland so "Sorry for my English" is the right thing to say first (the spellchecking option is really good).

A few weeks ago I had the idea to write a keyboard and I had started coding.
Now I have found this topic want to share my ideas and the code (I have it attached).
If the gui_keyboard_init function is used to start the keyboard a "normal" keyboard appears,
if gui_keyboard_fselect_init is used a keyboard, that is adapted for the filebrowser appears.
The keymap is hardcoded and with German vowel mutations (äöü), the big point is the space.

I haven't worked with EDI yet, but I'm going to test it.

regards,
TobiMarg

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #5 on: 16 / December / 2011, 11:45:29 »
TobiMarg,

Your code have pro. It is С code and so could be integrated into binary. (but I think that patch with all related changes is much simplier and useful way to share feature to testing).
And it has cons. Too many required key presses to enter one symbol. Adaptation of model from EDI (which is quite similar to way how it works on the phones) will be better solution in my opinion.

How it works:
- halfshoot change modes (navigate-small chars-big chars-numeric)
- each arrow has set of several character for each mode. Several pressing same arrow will change current sym. Press "set" if you need to enter another sym from same set or just press other arrow button.
- "set" finalize entering of current symbol or call tables of symbol/words if no symbol entered now
« Last Edit: 16 / December / 2011, 11:53:14 by tsvstar »

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #6 on: 16 / December / 2011, 12:19:45 »
tsvstar,

Now I have tested EDI and I think its really good, only the automatic typing was nerving.

I haven't made a patch, because I have CHDK-DE and functions for keyboard-right, left ... and it's not a
"standalone program".

I'm trying to make the things better (as you meant) and upload a new version.

If anybody has ha better idea please say it (otherwise I code what I think it's good and not what is needed)!

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #7 on: 16 / December / 2011, 12:54:25 »
Wow, I didn't notice, that something is happening in the thread... @tvstar your description of Edi typing style a little bit differs from original, I guess you have changed configuration?

@TobiMarg
It's nice that you work on the keyboard already:) Could you describe, please, how does it look on the screen? Maybe a kind of photo of the screen? (We should provide a function like dump_osd_screen() for documentations;)

I have still no time to write even Lua 'emultion' of my idea...

Quote
only the automatic typing was nerving.
what do you mean 'automatic typing'?

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

Compile error: poor Yorick


Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #8 on: 16 / December / 2011, 14:08:49 »
Hi

I have made a image of the Keyboard:

The Lines should all have the same size (because the light was bad the images are blurred).

Quote
what do you mean 'automatic typing'?
If I select a character in EDI it will be typed multiple times, but now I have noticed that it is only sporadic. I think it's a bug!?

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #9 on: 16 / December / 2011, 14:17:32 »
outslider,
I don't remember exact scheme so I could make mistake. Your EDI has creative scheme so it is interesting to see your new scheme.

tobimarg,
I think that to be useful enough virtual keyboard should be:
- based on EDI scheme
- isolated. something like current mbox but editbox. It should have edit string, "Ok" and "Cancel" button.
  call: gui_editbox( char* caption, char* text, char* editstr, int maxsize, void (*onselect)(unsigned int btn, char* newstr));
  create by malloc new string with required maxsize.
- configurable with text configure file. for example similar to described below.  if no scheme file selected, then use build-in.
list of symbols (one line = one mode. separated with |) - separator - table of sym (one line = one table; row1|row2|row3|row4|row5|...)

abcdef|ghijklm|nopqrs|tuvwxyz
ABCDEF|GHIJKLM|NOPQRST|UVWXYZ
1234|567|890|.-+,
=
#*$%|

This is enough to tasks like mkdir,  rename, etc...
I have no time to make such things by myself but I will gladly integrate such keyboard writed by anyone as module into my flat modules branch. (this is not trunk yet but futher feature)

Unfortunatelly such functionality is not enough to use such keyboard for EDI.

PS. your scheme is also good enough as input scheme in case if jogdial used. But it also should have "editbox" wrapper to be useful as is.

 

Related Topics