osdkbd.lua

Keyconf

This script is used to help provide a OSD keyboard / input box hybrid.
It depends on (scripts/symtable.lua and scripts/colourtable.lua) for keymapping, fonts and colours.

It depends on (images/osd_shift_down.png, images/osd_shift_up.png, images/ok.png, images/remove.png) for icons.

The basic pattern used looks somewhat like:

::lua

system_load("scripts/osdkbd.lua")();
osdkbd = osdkbd_create();
osdkbd:show();

The osdkbd_create function takes two optional arguments, map and opts.
Map is a table of allowed single characters (line-feed to start a new row) and only strings supported for now.

The opts is a table with boolean toggles, case_insensitive and keyboard_hidden currently.

With case_insensitive set to off, a shift button will be added and the uppercase method will be performed on all entries of the table when toggled.

Keyboard_hidden means that the keyboard part of the OSD remains hidden, and an input with the CONTEXT label will hide / show it.

**Table methods **

name args returns description
show none nil Show the OSD keyboard window
hide none nil Hide the OSD keyboard window
input label nil or string Returns a string with the completed input or nil if more data is requested. Labels are (MENU_UP, MENU_DOWN, MENU_LEFT, MENU_RIGHT, MENU_SELECT, MENU_ESCAPE, CONTEXT)
inputkey iotabl nil or string (for translated inputs) Returns a string with the completed input or nil if more data is requested
destroy none nil Remove all associated VIDs, any operations after this are undefined.

Related

Wiki: Support Scripts

MongoDB Logo MongoDB