def METHOD_NAME(self, sDefaultText='', Heading=''):
    keyboard = xbmc.Keyboard(sDefaultText)
    keyboard.setHeading(Heading)  # optional
    keyboard.doModal()
    if keyboard.isConfirmed():
        sSearchText = keyboard.getText()
        if (len(sSearchText)) > 0:
            return sSearchText
    return False