Mercurial > libervia-backend
comparison frontends/src/primitivus/keys.py @ 1158:c0f15e52695a
primitivus: use of new keys modules from Urwid SàText
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 04 Sep 2014 19:05:57 +0200 |
parents | |
children | a283968818da |
comparison
equal
deleted
inserted
replaced
1157:c4b62e6b7377 | 1158:c0f15e52695a |
---|---|
1 #!/usr/bin/python | |
2 # -*- coding: utf-8 -*- | |
3 | |
4 # Primitivus: a SAT frontend | |
5 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Jérôme Poisson (goffi@goffi.org) | |
6 | |
7 # This program is free software: you can redistribute it and/or modify | |
8 # it under the terms of the GNU Affero General Public License as published by | |
9 # the Free Software Foundation, either version 3 of the License, or | |
10 # (at your option) any later version. | |
11 | |
12 # This program is distributed in the hope that it will be useful, | |
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 # GNU Affero General Public License for more details. | |
16 | |
17 # You should have received a copy of the GNU Affero General Public License | |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 | |
20 """This file manage the action <=> key map""" | |
21 | |
22 from urwid_satext.keys import action_key_map | |
23 | |
24 | |
25 action_key_map.update( | |
26 { | |
27 # Edit bar | |
28 ("edit", "MODE_INSERTION"): "i", | |
29 ("edit", "MODE_COMMAND"): ":", | |
30 ("edit", "HISTORY_PREV"): "up", | |
31 ("edit", "HISTORY_NEXT"): "down", | |
32 | |
33 # global | |
34 ("global", "MENU_HIDE"): 'meta m', | |
35 ("global", "NOTIFICATION_NEXT"): 'ctrl n', | |
36 ("global", "OVERLAY_HIDE"): 'ctrl s', | |
37 ("global", "DEBUG"): 'ctrl d', | |
38 ("global", "CONTACTS_HIDE"): 'f2', | |
39 | |
40 # global menu | |
41 ("menu_global", "APP_QUIT"): 'ctrl x', | |
42 ("menu_global", "ROOM_JOIN"): 'meta j', | |
43 | |
44 # contact list | |
45 ("contact_list", "STATUS_HIDE"): "meta s", | |
46 ("contact_list", "DISCONNECTED_HIDE"): "meta d", | |
47 | |
48 # chat panel | |
49 ("chat_panel", "OCCUPANTS_HIDE"): "meta p", | |
50 ("chat_panel", "TIMESTAMP_HIDE"): "meta t", | |
51 ("chat_panel", "SHORT_NICKNAME"): "meta n", | |
52 ("chat_panel", "DECORATION_HIDE"): "meta l", | |
53 ("chat_panel", "SUBJECT_SWITCH"): "meta s", | |
54 | |
55 #card game | |
56 ("card_game", "CARD_SELECT"): ' ', | |
57 }) | |
58 | |
59 | |
60 action_key_map.set_close_namespaces(tuple(), ('global', 'focus', 'menu_global')) | |
61 action_key_map.check_namespaces() |