Skip to content

Commit 6f6fa93

Browse files
author
Sebastian Ramacher
committed
Support Meta and F* keys in urwid.
1 parent 1f54a15 commit 6f6fa93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bpython/keys.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def __setitem__(self, key, value):
5454
'^%s' % c.upper())
5555

5656
for c in string.ascii_lowercase:
57-
urwid_key_dispatch['C-%s' % c] = 'ctrl %s' % c
57+
urwid_key_dispatch['C-%s' % c] = 'ctrl %s' % c
58+
urwid_key_dispatch['M-%s' % c] = 'meta %s' % c
5859

5960
# fill dispatch with cool characters
6061
cli_key_dispatch['C-['] = (chr(27), '^[')
@@ -68,4 +69,4 @@ def __setitem__(self, key, value):
6869
cli_key_dispatch['F%s' % str(x)] = ('KEY_F(%s)' % str(x),)
6970

7071
for x in xrange(1, 13):
71-
urwid_key_dispatch['F%s' % str(x)] = 'F%s' % str(x)
72+
urwid_key_dispatch['F%s' % str(x)] = 'f%s' % str(x)

0 commit comments

Comments
 (0)