I added a DONE key, along with an option to retain the search when you reopen it. You can also now default to text only instead of images by just passing null to keys_image_folder() and set the keys charsize with .keys_charsize().
As for keyboard input, I realize why i didn't add it - I'm not sure if you can override (grab) individual keyboard keys, at least with a module. Have to look into it further.
You can grab the changes here:
https://github.com/liquid8d/attract-extra/tree/master/modules/objects/keyboard-searchAs I was making the changes, I realized it was not very clearly explained and I struggled myself to setup the default stuff
Some of the instructions were pulled directly from my blueprint layout and still had user_config[...] in there.
I'm going to update the instructions a bit. In the meantime, I added a sample layout:
https://github.com/liquid8d/attract-extra/tree/master/layouts/sample_keyboard_searchProbably the most confusing thing is text_pos() and keys_pos() - this is a 0-1 map of x, y, w, h on where the search text and key layout will be within the *search surface*. For example:
local search_surface = fe.add_surface(fe.layout.width / 2, fe.layout.height);
local keyboard = KeyboardSearch(search_surface)
keyboard.text_pos( 0, 0, 1, 0.1 )
Here the search text will occupy the full width of the search surface (or half the screen). It will occupy 10% (0.1) of the height of the search surface.
keyboard.text_pos( 0, 0.5, 1, 0.5 )
Here the keys (all of them) will occupy the bottom half of the search surface ( y = 0.5 and height = 0.5, or half of search surface height).
Hopefully that makes sense.