Thu 20 October 2011
Yet again, here's another bit of Enyo goodness. Inspired by Preware, I really love it when an app accepts keyboard input straight off the bat. I don't have to click anything, I can just start typing and it knows what I want to do. That's what JustType is on the OS level, but apps should have that too. If you're an app catalog like Preware, why is someone typing other than to search globally. If you're an app with any sort of content, they're probably searching.
This is another mixin, which means it requires the latest patch to enyo's mixin functionality. Once you have that, just copy-paste the code below and attach it to your main kind (the one referenced in index.html) by adding in the mixins: attribute and setting justtype: to the name of the search field to use. Once you do that, all keypresses that aren't already focused will go to that justtype: field if it's showing.