def _go_to_end(self): # We override this because the text areas can have more than one line. if self._is_keyboard_osk(): from ubuntu_keyboard.emulators.keyboard import Keyboard osk = Keyboard() while self.cursorPosition != len(self.text): # Move to the end of the line below osk.send_down_key() osk.send_end_key() else: self.keyboard.press_and_release('Ctrl+End')
def _go_to_start(self): # We override this because the text areas can have more than one line. if self._is_keyboard_osk(): from ubuntu_keyboard.emulators.keyboard import Keyboard osk = Keyboard() while self.cursorPosition != 0: # Move to the start of the line above osk.send_up_key() osk.send_home_key() else: self.keyboard.press_and_release('Ctrl+Home')
def _go_to_start(self): if self._is_keyboard_osk(): from ubuntu_keyboard.emulators.keyboard import Keyboard Keyboard().send_home_key() else: self.keyboard.press_and_release('Home')
def _go_to_end(self): if self._is_keyboard_osk(): from ubuntu_keyboard.emulators.keyboard import Keyboard Keyboard().send_end_key() else: self.keyboard.press_and_release('End')
def dismiss_osk(): if is_maliit_process_running(): osk = Keyboard() osk.dismiss()