Author: bugman Date: Wed Aug 3 10:45:20 2011 New Revision: 14082 URL: http://svn.gna.org/viewcvs/relax?rev=14082&view=rev Log: Key events are now controlled in the relax controller log element. This prevents text insertion and deletion. Modified: branches/gui_testing/gui/controller.py Modified: branches/gui_testing/gui/controller.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/controller.py?rev=14082&r1=14081&r2=14082&view=diff ============================================================================== --- branches/gui_testing/gui/controller.py (original) +++ branches/gui_testing/gui/controller.py Wed Aug 3 10:45:20 2011 @@ -511,6 +511,21 @@ # Set the font info. self.SetFont(font.modern_8) + # Bind events. + self.Bind(wx.EVT_KEY_DOWN, self.capture_keys) + + + def capture_keys(self, event): + """Control which key events are active, preventing text insertion and deletion. + + @param event: The wx event. + @type event: wx event + """ + + # Allow Ctrl+C events. + if event.ControlDown() and event.GetKeyCode() == 67: + event.Skip() + def limit_scrollback(self, prune=20): """Limit scroll back to the maximum number of lines.