Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulio Daniel Reyes <nemesiscodex@gmail.com>2013-06-24 17:33:17 (GMT)
committer Julio Daniel Reyes <nemesiscodex@gmail.com>2013-06-24 17:33:17 (GMT)
commit27841bf56916544943ad0db0df87982cccb8dc38 (patch)
treeb87f183602893b5353f7970c03732fa33527bd1c
parentb9d76e73bf44ad61f10f261a7b1d5c2478aa525b (diff)
add globalkey shortcut logout
-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()