diff options
author | Rafael Ortiz <rafael@activitycentral.com> | 2012-05-10 20:49:42 (GMT) |
---|---|---|
committer | Rafael Ortiz <rafael@activitycentral.com> | 2012-05-10 20:49:42 (GMT) |
commit | bca325bc01a6887197c06e45d6035c9f79a7f6a3 (patch) | |
tree | 0de11cd60b57af5f0cc9b1c1d8cd839a2a7995e7 | |
parent | 2ee6c30ff5d98e381f5eef6caa5bb1c73cd6a035 (diff) |
Revert "Used the same approach than the solution for the Escape"
This reverts commit 2ee6c30ff5d98e381f5eef6caa5bb1c73cd6a035.
-rw-r--r-- | terminal.py | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/terminal.py b/terminal.py index ee46fdc..6de7500 100644 --- a/terminal.py +++ b/terminal.py @@ -380,30 +380,15 @@ class TerminalActivity(activity.Activity): vt.fork_command("/bin/su", ('/bin/su', '-')) def __key_press_cb(self, window, event): - """Route some keypresses directly to the vte and then drop them. - - This prevents Sugar from hijacking events that are useful in - the vte. - - """ - - def event_to_vt(event): + # Escape keypresses are routed directly to the vte and then dropped. + # This hack prevents Sugar from hijacking them and canceling + # fullscreen mode. + if gtk.gdk.keyval_name(event.keyval) == 'Escape': current_page = self._notebook.get_current_page() vt = self._notebook.get_nth_page(current_page).vt vt.event(event) - - key_name = gtk.gdk.keyval_name(event.keyval) - - # Escape is used in Sugar to cancel fullscreen mode. - if key_name == 'Escape': - event_to_vt(event) return True - elif event.get_state() & gtk.gdk.CONTROL_MASK: - if key_name in ['z', 'q']: - event_to_vt(event) - return True - return False def read_file(self, file_path): |