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