def setupExample(self): manyReturns = '\n' * 30 global START_TAG, END_TAG textToAdd = '%s%s\n%s\n\n%s%s%s' % (START_TAG, manyReturns, self.title, self.text, manyReturns, END_TAG) x, y = self.boardPos.split(',') keyboard.setKeyboardYPos(int(y)) keyboard.setKeyboardXPos(int(x)) self.start_leap = commands.cursor.LeapForwardCommand('`') self.start_leap.execute() commands.text_editing.AddTextCommand(textToAdd).execute() commands.cursor.LeapBackwardCommand(self.title).execute() commands.cursor.LeapForwardCommand("\n\n").execute() commands.cursor.CreepLeftCommand().execute() commands.text_editing.SelectCommand().execute() mv = archyState.mainTextViewer mv.recenterOnCursor()
def doMoveKeyboard(self, pos): x, y = pos.split(',') keyboard.setKeyboardXPos(int(x)) keyboard.setKeyboardYPos(int(y))