keyboard echo
This commit is contained in:
parent
659e99d810
commit
0410c33a08
@ -21,8 +21,12 @@ layout=en
|
||||
['screen]
|
||||
driver=linux
|
||||
|
||||
[general]
|
||||
[keyboard]
|
||||
keyboardLayout=desktop
|
||||
charEcho=False
|
||||
wordEcho=True
|
||||
|
||||
[general]
|
||||
debugLevel=0
|
||||
punctuationLevel=1
|
||||
|
||||
|
@ -4,6 +4,12 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
print(environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charEcho') )
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charEcho') and\
|
||||
len(environment['screenData']['newDelta']) <= 2 and \
|
||||
environment['screenData']['newCursor'] != environment['screenData']['oldCursor']:
|
||||
print('dri')
|
||||
return environment
|
||||
if environment['screenData']['newDelta'] == environment['screenData']['oldDelta'] and \
|
||||
environment['screenData']['newTTY'] == environment['screenData']['oldTTY']:
|
||||
return environment
|
||||
|
@ -29,5 +29,10 @@ settings = {
|
||||
'keyboardLayout': "desktop",
|
||||
'debugLevel': debug.debugLevel.DEACTIVE,
|
||||
'punctuationLevel': 1
|
||||
},
|
||||
'keyboard':{
|
||||
'keyboardLayout': "desktop",
|
||||
'charEcho':False,
|
||||
'wordEcho':True,
|
||||
}
|
||||
}
|
||||
|
@ -81,14 +81,27 @@ class settingsManager():
|
||||
return value
|
||||
|
||||
def getSettingAsInt(self, environment, section, setting):
|
||||
return int(self.getSetting( environment, section, setting))
|
||||
value = ''
|
||||
try:
|
||||
value = environment['settings'].getint(section, setting)
|
||||
except:
|
||||
value = self.settings[section][setting]
|
||||
return value
|
||||
|
||||
def getSettingAsFloat(self, environment, section, setting):
|
||||
return float(self.getSetting( environment, section, setting))
|
||||
|
||||
value = ''
|
||||
try:
|
||||
value = environment['settings'].getfloat(section, setting)
|
||||
except:
|
||||
value = self.settings[section][setting]
|
||||
return value
|
||||
def getSettingAsBool(self, environment, section, setting):
|
||||
return bool(self.getSetting(environment, section, setting))
|
||||
|
||||
value = ''
|
||||
try:
|
||||
value = environment['settings'].getboolean(section, setting)
|
||||
except:
|
||||
value = self.settings[section][setting]
|
||||
return value
|
||||
def loadSpeechDriver(self, environment, driverName):
|
||||
if environment['runtime']['speechDriver'] != None:
|
||||
environment['runtime']['speechDriver'].shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user