Skip to content

Commit b4fbe9b

Browse files
committed
Urwid is gone, this can be named our default keymap
1 parent eca378a commit b4fbe9b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

bpython/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
from ConfigParser import ConfigParser
55
from itertools import chain
6-
from bpython.keys import cli_key_dispatch as key_dispatch
6+
from bpython.keys import key_dispatch
77
from bpython.autocomplete import SIMPLE as default_completion
88

99
class Struct(object):

bpython/keys.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ def __delitem__(self, key):
4646
def __setitem__(self, key, value):
4747
self.map[key] = value
4848

49-
cli_key_dispatch = KeyMap(tuple())
49+
key_dispatch = KeyMap(tuple())
5050

5151
# fill dispatch with letters
5252
for c in string.ascii_lowercase:
53-
cli_key_dispatch['C-%s' % c] = (chr(string.ascii_lowercase.index(c) + 1),
53+
key_dispatch['C-%s' % c] = (chr(string.ascii_lowercase.index(c) + 1),
5454
'^%s' % c.upper())
5555

5656
# fill dispatch with cool characters
57-
cli_key_dispatch['C-['] = (chr(27), '^[')
58-
cli_key_dispatch['C-\\'] = (chr(28), '^\\')
59-
cli_key_dispatch['C-]'] = (chr(29), '^]')
60-
cli_key_dispatch['C-^'] = (chr(30), '^^')
61-
cli_key_dispatch['C-_'] = (chr(31), '^_')
57+
key_dispatch['C-['] = (chr(27), '^[')
58+
key_dispatch['C-\\'] = (chr(28), '^\\')
59+
key_dispatch['C-]'] = (chr(29), '^]')
60+
key_dispatch['C-^'] = (chr(30), '^^')
61+
key_dispatch['C-_'] = (chr(31), '^_')
6262

6363
# fill dispatch with function keys
6464
for x in xrange(1, 13):
65-
cli_key_dispatch['F%s' % str(x)] = ('KEY_F(%s)' % str(x),)
65+
key_dispatch['F%s' % str(x)] = ('KEY_F(%s)' % str(x),)

0 commit comments

Comments
 (0)