From 27841bf56916544943ad0db0df87982cccb8dc38 Mon Sep 17 00:00:00 2001 From: Julio Daniel Reyes Date: Mon, 24 Jun 2013 17:33:17 +0000 Subject: add globalkey shortcut logout --- 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 = ['BackSpace'] + + +def handle_key_press(key): + manager = session.get_session_manager() + manager.logout() -- cgit v0.9.1