[Nvda-dev] commit r1953 - in trunk: . source

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] commit r1953 - in trunk: . source

NVDA Subversion
Author: jteh
Date: Wed Apr 23 23:56:10 2008
New Revision: 1953

Log:
pythonConsole: Make the f6 key toggle between the input and output text controls.

Modified:
   trunk/   (props changed)
   trunk/source/pythonConsole.py

Modified: trunk/source/pythonConsole.py
==============================================================================
--- trunk/source/pythonConsole.py (original)
+++ trunk/source/pythonConsole.py Wed Apr 23 23:56:10 2008
@@ -62,6 +62,7 @@
  self.Bind(wx.EVT_CLOSE, self.onClose)
  mainSizer = wx.BoxSizer(wx.VERTICAL)
  self.outputCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(500, 500), style=wx.TE_MULTILINE | wx.TE_READONLY)
+ self.outputCtrl.Bind(wx.EVT_CHAR, self.onOutputChar)
  mainSizer.Add(self.outputCtrl, proportion=2, flag=wx.EXPAND)
  inputSizer = wx.BoxSizer(wx.HORIZONTAL)
  self.promptLabel = wx.StaticText(self, wx.ID_ANY)
@@ -125,6 +126,16 @@
  elif key in (wx.WXK_UP, wx.WXK_DOWN):
  if self.historyMove(-1 if key == wx.WXK_UP else 1):
  return
+ elif key == wx.WXK_F6:
+ self.outputCtrl.SetFocus()
+ return
+ evt.Skip()
+
+ def onOutputChar(self, evt):
+ key = evt.GetKeyCode()
+ if key == wx.WXK_F6:
+ self.inputCtrl.SetFocus()
+ return
  evt.Skip()
 
  def updateNamespaceSnapshotVars(self):