initial char delete echo
This commit is contained in:
parent
30155b6d83
commit
a277c10dcd
@ -23,6 +23,7 @@ driver=linux
|
|||||||
[keyboard]
|
[keyboard]
|
||||||
keyboardLayout=desktop
|
keyboardLayout=desktop
|
||||||
charEcho=False
|
charEcho=False
|
||||||
|
charDeleteEcho=True
|
||||||
wordEcho=True
|
wordEcho=True
|
||||||
interruptOnKeyPress=False
|
interruptOnKeyPress=False
|
||||||
|
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/python
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
def run(self, environment):
|
||||||
|
|
||||||
|
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charDeleteEcho'):
|
||||||
|
return environment
|
||||||
|
# detect typing
|
||||||
|
if environment['screenData']['newCursor']['x'] > environment['screenData']['oldCursor']['x']:
|
||||||
|
return environment
|
||||||
|
# TTY change
|
||||||
|
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||||
|
return environment
|
||||||
|
# More than just a deletion happend
|
||||||
|
if environment['screenData']['newDelta'] != environment['screenData']['oldDelta']:
|
||||||
|
return environment
|
||||||
|
# No deletion
|
||||||
|
if environment['screenData']['newNegativeDelta'] == environment['screenData']['oldNegativeDelta']:
|
||||||
|
return environment
|
||||||
|
if environment['screenData']['newNegativeDelta'] == '':
|
||||||
|
return environment
|
||||||
|
|
||||||
|
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newNegativeDelta'], interrupt=True)
|
||||||
|
|
||||||
|
return environment
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
@ -33,6 +33,7 @@ settings = {
|
|||||||
'keyboard':{
|
'keyboard':{
|
||||||
'keyboardLayout': "desktop",
|
'keyboardLayout': "desktop",
|
||||||
'charEcho':False,
|
'charEcho':False,
|
||||||
|
'charDeleteEcho':True,
|
||||||
'wordEcho':True,
|
'wordEcho':True,
|
||||||
'interruptOnKeyPress': True,
|
'interruptOnKeyPress': True,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user