Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xextensions/globalkey/logout.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/extensions/globalkey/logout.py b/extensions/globalkey/logout.py
new file mode 100755
index 0000000..3cbc43c
--- /dev/null
+++ b/extensions/globalkey/logout.py
@@ -0,0 +1,24 @@
+# Copyright (C) 2011 One Laptop Per Child
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+from jarabe.model import session
+
+BOUND_KEYS = ['<control><alt>BackSpace']
+
+
+def handle_key_press(key):
+ manager = session.get_session_manager()
+ manager.logout()