fix shutup onInput, make shutup filterable

This commit is contained in:
chrys 2016-12-18 22:55:11 +01:00
parent 94dd683ef4
commit b9aabcf0b3
6 changed files with 17 additions and 2 deletions

View File

@ -92,6 +92,8 @@ charDeleteEcho=True
wordEcho=True
# interrupt speech on any keypress
interruptOnKeyPress=True
# you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys)
interruptOnKeyPressFilter=
# timeout for double tap in sec
doubleTapTimeout=0.2

View File

@ -93,6 +93,8 @@ charDeleteEcho=True
wordEcho=False
# interrupt speech on any keypress
interruptOnKeyPress=False
# you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys)
interruptOnKeyPressFilter=
# timeout for double tap in sec
doubleTapTimeout=0.2

View File

@ -92,6 +92,8 @@ charDeleteEcho=True
wordEcho=False
# interrupt speech on any keypress
interruptOnKeyPress=False
# you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys)
interruptOnKeyPressFilter=
# timeout for double tap in sec
doubleTapTimeout=0.2

View File

@ -43,6 +43,8 @@ charEcho=False
charDeleteEcho=True
wordEcho=False
interruptOnKeyPress=True
# you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys)
interruptOnKeyPressFilter=
# timeout for double tap in sec
doubleTapTimeout=0.2

View File

@ -22,8 +22,14 @@ class command():
if self.env['runtime']['inputManager'].noKeyPressed():
return
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
return
if self.environment['runtime']['screenManager'].isScreenChange():
return
if len(self.env['input']['currInput']) != 1:
return
# if the filter is set
if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
if not self.env['input']['currInput'][0] in self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(','):
return
if self.env['runtime']['screenManager'].isScreenChange():
return
self.env['runtime']['outputManager'].interruptOutput()

View File

@ -87,6 +87,7 @@ settings = {
'charDeleteEcho': True,
'wordEcho': True,
'interruptOnKeyPress': True,
'interruptOnKeyPressFilter': '',
'doubleTapTimeout': 0.2,
}
}