supplierdeeply

Virtual Keyboard

  • 3 Replies
  • 876 Views
*

Offline otosclerosi

  • *
  • 22
  • Canon IXUS160 with CHDK 1.5
Virtual Keyboard
« on: 07 / December / 2016, 04:08:10 »
Advertisements
Here is the first version of a virtual keyboard i made using drawings which is useless alone but if included in other scripts will provide an easy input method... the main function returns the written string (max 42 chars) so you can insert it like a function and do something like
input=keyboard()
i found it useful in a couple of scripts i'm writing
:)
Features:
- Alphanumeric values and some symbols
- Two input grids (switch using "zoom+" and "zoom-")
- Space with "video"
- Backspace with "menu"
- Return string (end of input) with "half shot"
- Select characters using 'arrows'

Quote
INFO AND USAGE
Copy the whole code in your script or in a library and the use result=keyboard.kinput(string) to obtain a string result.
Comment or delete the last line of this code which is the keyboard.kinput(string) used by the standalone version.
'string' is a message you can display to the final user via an alert box, use 'NIL' to display nothing.
Note that there are certain var names used by the keyboard, like 'page','k','keyboard','kstringa' and others, pay attention!

BUTTONS
For cameras having 'menu' and 'video' button, 'menu' is a backspace and 'video' a space.
For everyone else, use the characters on the keyboard.
'zoom_in' and 'zoom_out' change the page (letters/numbers and symbols).
'half_press' returns the string and terminate the script via "return" method.

Tell me what do you think 'bout it :D

UPDATE: Alpha version is out :) Link updated!

« Last Edit: 10 / December / 2016, 10:17:21 by otosclerosi »
Can a kangaroo jump higher than a house?
Of course, a house doesn’t jump at all.

*

Offline msl

  • *****
  • 1227
  • A720 IS, SX220 HS 1.01a
    • CHDK inside
Re: Virtual Keyboard
« Reply #1 on: 07 / December / 2016, 05:30:18 »
Nice.

Remember, CHDK supports more than 140 cameras. Not all cameras have the same buttons. Only SET, MENU, directional buttons and shutter are available for all cameras.

Your scripts should have a CHDK script header, at least the title tag @title.

Have you seen the wiki site with the special chdk script functions. There is also a textbox command available.

msl
German CHDK pages:  CHDK forum | CHDK inside | CHDK Twitter News by msl | Download CHDK-DE (Autobuild)
Note: SDM violates the GPL rules!

*

Offline otosclerosi

  • *
  • 22
  • Canon IXUS160 with CHDK 1.5
Re: Virtual Keyboard
« Reply #2 on: 07 / December / 2016, 07:41:38 »
ty :)
no i haven't seen it but i knew the textbox command ty to reyalp...but i probably didn't read the whole reference 'cause i realized only now how it works :P
and it's easier to include in my scripts, also
i'll modify some things like the @title as soon as possible
Can a kangaroo jump higher than a house?
Of course, a house doesn’t jump at all.

*

Offline otosclerosi

  • *
  • 22
  • Canon IXUS160 with CHDK 1.5
Re: Virtual Keyboard
« Reply #3 on: 10 / December / 2016, 10:18:36 »
Updated! inserted @title and useful info in comments, solved the compatibilty issue (buttons) and edited the code so you can use it in a much easier way in your script (if you need to)!
Can a kangaroo jump higher than a house?
Of course, a house doesn’t jump at all.


 

Related Topics