Resetting default letter selection of MiniKeyboard

Is there anyway to tell the MiniKeyboard to select a particular text button? I use the MiniKeyboard on my search screen. When I go back a screen, I reset the search screen so it looks like it first did when the user comes back to the search screen. I hide the search results; I set the focus back onto the MiniKeyboard. One other thing I would like to do in order to reset the screen is set the default focused letter to be the upper left and corner letter.

Is there a way to tell the keyboard to change which letter is in focus?

thanks!

If I’m not mistaken, miniKeyboard and keyboard don’t support setting position programmatically; I think you have two options:

  1. re-instantiate each time the screen loads;
m.minikeyboard = createObject("RoSGNode", "miniKeyboard")

(now it will have default focus position, and all other fields reset to default)

  1. create a custom component that acts like minikeyboard but allows programatic control over focus position.

Joe:

Re-instantiating a MiniKeyboard works, It’s a bit overkill, but it works. I wish brightscript allowed to reset the existing keyboard, but whatever works.

thanks!!!

well it’s not brightscript that’s stopping you but the design of the individual components. Roku could have included this when they created the pre-built components, but since they didn’t, you still have the option to build your own custom component that looks and acts like the miniKeyboard component. But it’s a much bigger pain than re-instantiating, so if this is all you need, that’s what I’d do.

thanks, Joe!

I have not tested with the minikeyboard but for the full sized keyboard that is a part of a keyboard dialog

m.keyboard=m.TOP.createChild("KeyboardDialog")
m.keyboard.buttons=["CONFIRM","CANCEL"]
'...
m.keyboard.focusButton=0 'resets to confirm
m.keyboard.getchild(11).getchild(0).getchild(0).JumpToItem=0 'or animateToItem=0 if you want it to visibly move