Kodi's keyboard class.  
More...
Kodi's keyboard class. 
 
Class:  xbmc.Keyboard([default, heading, hidden]) 
 
Creates a new Keyboard object with default text heading and hidden input flag if supplied.
- Parameters
 - 
  
    | default | : [opt] string - default text entry.  | 
    | heading | : [opt] string - keyboard heading.  | 
    | hidden | : [opt] boolean - True for hidden text entry. | 
  
   
Example: 
..
kb = xbmc.Keyboard('default', 'heading', True)
kb.setDefault('password') 
kb.setHeading('Enter password') 
kb.setHiddenInput(True) 
kb.doModal()
if (kb.isConfirmed()):
  text = kb.getText()
..
  
◆ doModal()
      
        
          | void XBMCAddon::xbmc::Keyboard::doModal  | 
          ( | 
           |           ... | ) | 
           | 
        
      
 
 
Function:  doModal([autoclose]) 
  Show keyboard and wait for user action. 
- Parameters
 - 
  
    | autoclose | [opt] integer - milliseconds to autoclose dialog. (default=do not autoclose) | 
  
   
Example: 
 
 
 
◆ getText()
      
        
          | String XBMCAddon::xbmc::Keyboard::getText  | 
          ( | 
           | ) | 
           | 
        
      
 
 
Function:  getText() 
  Returns the user input as a string. 
- Note
 - This will always return the text entry even if you cancel the keyboard. Use the isConfirmed() method to check if user cancelled the keyboard.
 
- Returns
 - get the in keyboard entered text
 
Example: 
..
text = kb.getText()
..
  
 
 
◆ isConfirmed()
      
        
          | bool XBMCAddon::xbmc::Keyboard::isConfirmed  | 
          ( | 
           | ) | 
           | 
        
      
 
 
Function:  isConfirmed() 
  Returns False if the user cancelled the input. 
- Returns
 - true if confirmed, if cancelled false
 
Example: 
..
if (kb.isConfirmed()):
  ..
  
 
 
◆ Keyboard()
◆ setDefault()
      
        
          | void XBMCAddon::xbmc::Keyboard::setDefault  | 
          ( | 
           |           ... | ) | 
           | 
        
      
 
 
Function:  setDefault(line) 
  Set the default text entry. 
- Parameters
 - 
  
    | line | string - default text entry. | 
  
   
Example: 
..
kb.setDefault('password')
..
  
 
 
◆ setHeading()
      
        
          | void XBMCAddon::xbmc::Keyboard::setHeading  | 
          ( | 
           |           ... | ) | 
           | 
        
      
 
 
Function:  setHeading(heading) 
  Set the keyboard heading. 
- Parameters
 - 
  
    | heading | string - keyboard heading. | 
  
   
Example: 
..
kb.setHeading('Enter password')
..
  
 
 
◆ setHiddenInput()
      
        
          | void XBMCAddon::xbmc::Keyboard::setHiddenInput  | 
          ( | 
           |           ... | ) | 
           | 
        
      
 
 
Function:  setHiddenInput(hidden) 
  Allows hidden text entry. 
- Parameters
 - 
  
    | hidden | boolean - True for hidden text entry. | 
  
   
Example: 
..
kb.setHiddenInput(True)
..
  
 
 
◆ ~Keyboard()
  
  
      
        
          | XBMCAddon::xbmc::Keyboard::~Keyboard  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
overridedefault   | 
  
 
 
◆ bConfirmed
      
        
          | bool XBMCAddon::xbmc::Keyboard::bConfirmed = false | 
        
      
 
 
◆ bHidden
      
        
          | bool XBMCAddon::xbmc::Keyboard::bHidden | 
        
      
 
 
◆ strDefault
      
        
          | String XBMCAddon::xbmc::Keyboard::strDefault | 
        
      
 
 
◆ strHeading
      
        
          | String XBMCAddon::xbmc::Keyboard::strHeading | 
        
      
 
 
◆ strText
      
        
          | String XBMCAddon::xbmc::Keyboard::strText |