Index: src/squeezeplay/share/jive/InputToActionMap.lua =================================================================== --- src/squeezeplay/share/jive/InputToActionMap.lua (revision 5050) +++ src/squeezeplay/share/jive/InputToActionMap.lua Tue Mar 31 14:28:27 CDT 2009 @@ -176,4 +176,5 @@ -- enter actions here that are triggered in the app but not by any hard input mechanism. Entering them here will get them registered so they can be used unassignedActionMappings = { "finish_operation", + "clear", } Index: src/squeezeplay/share/jive/ui/Keyboard.lua =================================================================== --- src/squeezeplay/share/jive/ui/Keyboard.lua (revision 5050) +++ src/squeezeplay/share/jive/ui/Keyboard.lua Tue Mar 31 14:31:27 CDT 2009 @@ -374,6 +374,12 @@ Framework:playSound("SELECT") Framework:dispatchEvent(nil, e) return EVENT_CONSUME + end, + function() + Framework:playSound("SELECT") + Framework:pushAction("clear") + return EVENT_CONSUME + end ) Index: src/squeezeplay/share/jive/ui/Textinput.lua =================================================================== --- src/squeezeplay/share/jive/ui/Textinput.lua (revision 5050) +++ src/squeezeplay/share/jive/ui/Textinput.lua Tue Mar 31 15:02:06 CDT 2009 @@ -351,6 +351,14 @@ end +function _clearAction(self) + self:setValue("") + self.cursor = 1 + self.indent = 0 + return EVENT_CONSUME +end + + function _eventHandler(self, event) local type = event:getType() @@ -627,6 +635,7 @@ obj:addActionListener("back", obj, _escapeAction) obj:addActionListener("finish_operation", obj, _doneAction) + obj:addActionListener("clear", obj, _clearAction) obj:addListener(EVENT_CHAR_PRESS| EVENT_KEY_PRESS | EVENT_SCROLL | EVENT_WINDOW_RESIZE | EVENT_IR_ALL, function(event)