Commit 7fedadd4 authored by Dan Pascu's avatar Dan Pascu

Accept both uppercase and lowercase letters when sending DTMF

parent 63a3dd7e
...@@ -2212,7 +2212,7 @@ class AudioSessionListView(QListView): ...@@ -2212,7 +2212,7 @@ class AudioSessionListView(QListView):
self.context_menu.hide() self.context_menu.hide()
def keyPressEvent(self, event): def keyPressEvent(self, event):
char = event.text() char = event.text().upper()
if char and char in string.digits+string.uppercase+'#*': if char and char in string.digits+string.uppercase+'#*':
letter_map = {'2': 'ABC', '3': 'DEF', '4': 'GHI', '5': 'JKL', '6': 'MNO', '7': 'PQRS', '8': 'TUV', '9': 'WXYZ'} letter_map = {'2': 'ABC', '3': 'DEF', '4': 'GHI', '5': 'JKL', '6': 'MNO', '7': 'PQRS', '8': 'TUV', '9': 'WXYZ'}
letter_map = dict(chain(*(izip(letters, repeat(char)) for char, letters in letter_map.iteritems()))) letter_map = dict(chain(*(izip(letters, repeat(char)) for char, letters in letter_map.iteritems())))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment