+ # Home needs to be aware of the prompt.
+ elif key == WXK_HOME:
+ home = self.promptPosEnd
+ if currpos > home:
+ selecting = self.GetSelectionStart() != self.GetSelectionEnd()
+ self.SetCurrentPos(home)
+ if not selecting and not shiftDown:
+ self.SetAnchor(home)
+ self.EnsureCaretVisible()
+ else:
+ event.Skip()
+ #
+ # The following handlers modify text, so we need to see if there
+ # is a selection that includes text prior to the prompt.
+ #
+ # Don't modify a selection with text prior to the prompt.
+ elif self.GetSelectionStart() != self.GetSelectionEnd()\
+ and key not in NAVKEYS and not self.CanEdit():
+ pass