From 0c0564012c02eb37cbed9d84b34517cd3aa9e12e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 12 Oct 2016 21:36:11 +0200 Subject: [PATCH 01/15] initial punctuation and dict import --- config/settings/settings.conf | 1 + config/substitution/default.conf | 45 ------------------- src/fenrir/core/environment.py | 2 + src/fenrir/core/punctuationManager.py | 60 +++----------------------- src/fenrir/core/settings.py | 1 + src/fenrir/core/settingsManager.py | 41 ++++++++++++++++++ src/fenrir/fenrir.egg-info/SOURCES.txt | 2 - 7 files changed, 51 insertions(+), 101 deletions(-) delete mode 100644 config/substitution/default.conf diff --git a/config/settings/settings.conf b/config/settings/settings.conf index e090b402..ad76400e 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -97,6 +97,7 @@ doubleTapDelay=0.2 [general] debugLevel=3 +punctuationProfile=default punctuationLevel=some numberOfClipboards=10 # define the current fenrir key diff --git a/config/substitution/default.conf b/config/substitution/default.conf deleted file mode 100644 index d693a5fe..00000000 --- a/config/substitution/default.conf +++ /dev/null @@ -1,45 +0,0 @@ -[levelProfile] -None= -Some=.-$~+*-/\\@ -Most=.,:-$~+*-/\\@!#%^&*()[]}{<>; -All=!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ - -[punctDict] -&=and -'=apostrophe -@=at -\=backslash -|=bar -!=bang -^=carrot -:=colon -,=comma --=dash -$=dollar -.=dot ->=greater -`=grave -#=hash -{=left brace -[=left bracket -(=left paren -<=less -%=percent -+=plus -?=question -"=quote -)=right paren -}=right brace -]=right bracket -;=semicolon -/=slash -*=star -~=tilde -_=line -==equals - -[userDict] -:)=smile -;)=twinker -XD=loool -:D=lought diff --git a/src/fenrir/core/environment.py b/src/fenrir/core/environment.py index 6d66dc85..367305a8 100644 --- a/src/fenrir/core/environment.py +++ b/src/fenrir/core/environment.py @@ -11,6 +11,7 @@ from core import screenData from core import generalInformation from core import commands from core import inputEvent +from core import punctuation environment = { 'screenData': screenData.screenData, @@ -22,6 +23,7 @@ environment = { 'commandInfo': commands.commandInfo, 'commandBuffer': commands.commandBuffer, 'input': inputEvent.input, +'punctuation': punctuation.punctuation, 'soundIcons': {}, 'bindings': {}, } diff --git a/src/fenrir/core/punctuationManager.py b/src/fenrir/core/punctuationManager.py index b7b2f686..74465d82 100644 --- a/src/fenrir/core/punctuationManager.py +++ b/src/fenrir/core/punctuationManager.py @@ -17,55 +17,6 @@ class punctuationManager(): # dot, comma, grave, apostrophe for char in [ord('.'),ord(','),ord('`'),ord("'")]: self.allPunctNone[char] = None - self.punctuation = { - 'levels':{ - 'none': '', - 'some': '#-$~+*-/\\@', - 'most': '.,:-$~+*-/\\@!#%^&*()[]}{<>;', - 'all': string.punctuation, - }, - 'punctuationDict':{ - '&':'and', - "'":"apostrophe", - '@':'at', - '\\':'backslash', - '|':'bar', - '!':'bang', - '^':'carrot', - ':':'colon', - ',':'comma', - '-':'dash', - '$':'dollar', - '.':'dot', - '>':'greater', - '`':'grave', - '#':'hash', - '{':'left brace', - '[':'left bracket', - '(':'left paren', - '<':'less', - '%':'percent', - '+':'plus', - '?':'question', - '"':'quote', - ')':'right paren', - '}':'right brace', - ']':'right bracket', - ';':'semicolon', - '/':'slash', - '*':'star', - '~':'tilde', - '_':'line', - '=':'equals', - }, - 'customDict':{ - ':)':'smiley', - ';)':'winking face', - 'XD':'loool', - ':@':'angry face', - ':D':'lought' - } - } def shutdown(self): pass def removeUnused(self, text): @@ -87,18 +38,19 @@ class punctuationManager(): return resultText def proceedPunctuation(self, text, ignorePunctuation=False): - resultText = self.useCustomDict(text, self.punctuation['customDict']) + resultText = self.useCustomDict(text, self.env['punctuation']['CUSTOMDICT']) + resultText = self.useCustomDict(text, self.env['punctuation']['EMOJDICT']) currPunctLevel = '' - if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.punctuation['levels']: - currPunctLevel = self.punctuation['levels'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()] + if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']: + currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()] else: currPunctLevel = string.punctuation - resultText = self.usePunctuationDict(resultText, self.punctuation['punctuationDict'], currPunctLevel) + resultText = self.usePunctuationDict(resultText, self.env['punctuation']['PUNCTDICT'], currPunctLevel) resultText = self.removeUnused(resultText) return resultText def cyclePunctuation(self): - punctList = list(self.punctuation['levels'].keys()) + punctList = list(self.env['punctuation']['LEVELDICT'].keys()) try: currIndex = punctList.index(self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()) # curr punctuation except: diff --git a/src/fenrir/core/settings.py b/src/fenrir/core/settings.py index a4fcbb12..13e4895b 100644 --- a/src/fenrir/core/settings.py +++ b/src/fenrir/core/settings.py @@ -41,6 +41,7 @@ settings = { }, 'general':{ 'debugLevel': debug.debugLevel.DEACTIVE, + 'punctuationProfile':'default', 'punctuationLevel': 1, 'numberOfClipboards': 10, 'fenrirKeys': ['KEY_KP0'], diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 0d540500..2966e49a 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -33,6 +33,8 @@ class settingsManager(): if not line: break line = line.replace('\n','') + if line.replace(" ","") == '': + continue if line.replace(" ","").startswith("#"): continue if line.count("=") != 1: @@ -64,6 +66,8 @@ class settingsManager(): if not line: break line = line.replace('\n','') + if line.replace(" ","") == '': + continue if line.replace(" ","").startswith("#"): continue if line.count("=") != 1: @@ -83,6 +87,33 @@ class settingsManager(): self.env['soundIcons'][soundIcon] = soundIconFile siConfig.close() + def loadDicts(self, dictConfigPath=os.path.dirname(os.path.realpath(__main__.__file__)) + '/../../config/punctuation/default.conf'): + dictConfig = open(dictConfigPath,"r") + currDictName = '' + while(True): + line = dictConfig.readline() + if not line: + break + line = line.replace('\n','') + if line.replace(" ","") == '': + continue + if line.replace(" ","").startswith("#"): + continue + if line.replace(" ","").upper().startswith("[") and \ + line.replace(" ","").upper().endswith("DICT]"): + currDictName = line[line.find('[') + 1 :line.upper().find('DICT]') + 4].upper() + else: + if currDictName == '': + continue + if not ":===:" in line: + continue + sepLine = line.split(':===:') + if len(sepLine) != 2: + sepLine.append('') + self.env['punctuation'][currDictName][sepLine[0]] = sepLine[1] + self.env['runtime']['debug'].writeDebugOut("Punctuation: " + currDictName + '.' + str(sepLine[0]) + ' :' + sepLine[1] ,debug.debugLevel.INFO) + dictConfig.close() + def loadSettings(self, settingConfigPath): if not os.path.exists(settingConfigPath): return False @@ -189,6 +220,16 @@ class settingsManager(): else: environment['runtime']['settingsManager'].loadSoundIcons(self.getSetting('sound','theme')) + if not os.path.exists(self.getSetting('general','punctuationProfile')): + if os.path.exists(settingsRoot + 'punctuation/' + self.getSetting('general','punctuationProfile')): + self.setSetting('general', 'punctuationProfile', settingsRoot + 'punctuation/' + self.getSetting('general','punctuationProfile')) + environment['runtime']['settingsManager'].loadDicts(self.getSetting('general','punctuationProfile')) + if os.path.exists(settingsRoot + 'punctuation/' + self.getSetting('general','punctuationProfile') + '.conf'): + self.setSetting('general', 'punctuationProfile', settingsRoot + 'punctuation/' + self.getSetting('general','punctuationProfile') + '.conf') + environment['runtime']['settingsManager'].loadDicts(self.getSetting('general','punctuationProfile')) + else: + environment['runtime']['settingsManager'].loadDicts(self.getSetting('general','punctuationProfile')) + environment['runtime']['inputManager'] = inputManager.inputManager() environment['runtime']['inputManager'].initialize(environment) environment['runtime']['outputManager'] = outputManager.outputManager() diff --git a/src/fenrir/fenrir.egg-info/SOURCES.txt b/src/fenrir/fenrir.egg-info/SOURCES.txt index e8c40a4b..16a43f15 100644 --- a/src/fenrir/fenrir.egg-info/SOURCES.txt +++ b/src/fenrir/fenrir.egg-info/SOURCES.txt @@ -1,7 +1,5 @@ setup.py src/fenrir/fenrir -src/fenrir/braille/__init__.py -src/fenrir/braille/braille.py src/fenrir/commands/__init__.py src/fenrir/commands/command_template.py src/fenrir/commands/switchTrigger_template.py From 7d0a465ed703c8b7e7cb3fc157e88d4b2060f580 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 12 Oct 2016 21:37:19 +0200 Subject: [PATCH 02/15] initial punctuation and dict import --- config/punctuation/default.conf | 52 +++++++++++++ config/settings/settings.conf.chrys | 114 ++++++++++++++++++++++++++++ src/fenrir/core/punctuation.py | 61 +++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 config/punctuation/default.conf create mode 100644 config/settings/settings.conf.chrys create mode 100644 src/fenrir/core/punctuation.py diff --git a/config/punctuation/default.conf b/config/punctuation/default.conf new file mode 100644 index 00000000..17dc7b9e --- /dev/null +++ b/config/punctuation/default.conf @@ -0,0 +1,52 @@ +# how to use this file? +# the # on the beginning of the line is a comment +# the different sections are seperated by [Dict] is the section name. Dict is a keyword +# the entrys are seperated with :===: in words colon tripple equal colon ( to not collide with substitutions) +[levelDict] +None:===: +Some:===:.-$~+*-/\\@ +Most:===:.,:-$~+*-/\\@!#%^&*()[]}{<>; +All:===:!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ + +[punctDict] +&:===:and +':===:apostrophe +@:===:at +\:===:backslash +|:===:bar +!:===:bang +^:===:carrot +::===:colon +,:===:comma +-:===:dash +$:===:dollar +.:===:dot +>:===:greater +`:===:grave +#:===:hash +{:===:left brace +[:===:left bracket +(:===:left paren +<:===:less +%:===:percent ++:===:plus +?:===:question +":===:quote +):===:right paren +}:===:right brace +]:===:right bracket +;:===:semicolon +/:===:slash +*:===:star +~:===:tilde +_:===:line +=:===:equals + +[customDict] +chrys:===:king chrys + +[emojDict] +:):===:smile +;):===:twinker +XD:===:loool +:D:===:lought diff --git a/config/settings/settings.conf.chrys b/config/settings/settings.conf.chrys new file mode 100644 index 00000000..13b249be --- /dev/null +++ b/config/settings/settings.conf.chrys @@ -0,0 +1,114 @@ +[sound] +# Turn sound on or off: +enabled=True + +# Select the driver used to play sounds, choices are generic and gstreamer. +# Sox is the default. +driver=generic + +# Sound themes. This is the pack of sounds used for sound alerts. +# Sound packs may be located at /usr/share/sounds +# For system wide availability, or ~/.local/share/fenrir/sounds +# For the current user. +theme=default + +# Sound volume controls how loud the sounds for your chosen soundpack are. +# 0 is quietest, 1.0 is loudest. +volume=1.0 + +# shell commands for generic sound driver +# the folowing variable are substituded +# fenrirVolume = the current volume setting +# fenrirSoundFile = the soundfile for an soundicon +# fenrirFrequence = the frequence to play +# fenrirDuration = the duration of the frequence +# the following command is used for play a soundfile +genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile +#the following command is used for generating a frequence beep +genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence + +[speech] +# Turn speech on or off: +enabled=True + +# Select speech driver, options are speechd (default) or espeak: +driver=speechd +#driver=espeak + + +# The rate selects how fast fenrir will speak. Options range from 0, slowest, to 1.0, fastest. +rate=0.45 + +# Pitch controls the pitch of the voice, select from 0, lowest, to 1.0, highest. +pitch=0.5 +# Pitch for capital letters +capitalPitch=0.9 + +# Volume controls the loudness of the voice, select from 0, quietest, to 1.0, loudest. +volume=1.0 + +# Module is used for speech-dispatcher, to select the speech module you want to use. +# Consult speech-dispatcher's configuration and help ti find out which modules are available. +# The default is espeak. +module=espeak + +# Voice selects the varient you want to use, for example, f5 will use the female voice #5 in espeak, +# or if using the espeak module in speech-dispatcher. To find out which voices are available, consult the documentation provided with your chosen synthesizer. +voice= + +# Select the language you want fenrir to use. +language=de + +# Read new text as it happens? +autoReadIncoming=True + +[braille] +#braille is not implemented yet +enabled=True +driver=brlapi +layout=en + +[screen] +driver=linux +encoding=cp850 +screenUpdateDelay=0.4 +suspendingScreen= +autodetectSuspendingScreen=True + +[keyboard] +driver=evdev +# filter input devices AUTO, ALL or a DEVICE NAME +device=AUTO +# gives fenrir exclusive access to the keyboard and let consume keystrokes. just disable on problems. +grabDevices=True +ignoreShortcuts=False +# the current shortcut layout located in /etc/fenrir/keyboard +keyboardLayout=test +# echo chars while typing. +charEcho=False +# echo deleted chars +charDeleteEcho=True +# echo word after pressing space +wordEcho=False +# interrupt speech on any keypress +interruptOnKeyPress=False +# timeout for double tap in sec +doubleTapDelay=0.2 + +[general] +debugLevel=1 +punctuationLevel=Some +numberOfClipboards=10 +# define the current fenrir key +fenrirKeys=KEY_KP0,KEY_META +timeFormat=%H:%M:%P +dateFormat=%A, %B %d, %Y +autoSpellCheck=True +spellCheckLanguage=en_US + +[promote] +enabled=True +inactiveTimeoutSec=120 +list= + + diff --git a/src/fenrir/core/punctuation.py b/src/fenrir/core/punctuation.py new file mode 100644 index 00000000..960d92e2 --- /dev/null +++ b/src/fenrir/core/punctuation.py @@ -0,0 +1,61 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug +import string + +punctuation = { +'LEVELDICT':{ + 'none': '', + 'some': '#-$~+*-/\\@', + 'most': '.,:-$~+*-/\\@!#%^&*()[]}{<>;', + 'all': string.punctuation, + }, +'PUNCTDICT':{ + '&':'and', + "'":"apostrophe", + '@':'at', + '\\':'backslash', + '|':'bar', + '!':'bang', + '^':'carrot', + ':':'colon', + ',':'comma', + '-':'dash', + '$':'dollar', + '.':'dot', + '>':'greater', + '`':'grave', + '#':'hash', + '{':'left brace', + '[':'left bracket', + '(':'left paren', + '<':'less', + '%':'percent', + '+':'plus', + '?':'question', + '"':'quote', + ')':'right paren', + '}':'right brace', + ']':'right bracket', + ';':'semicolon', + '/':'slash', + '*':'star', + '~':'tilde', + '_':'line', + '=':'equals', + }, +'CUSTOMDICT':{ + 'chrys': 'king chrys' + }, +'EMOJDICT':{ + ':)':'smiley', + ';)':'winking face', + 'XD':'loool', + ':@':'angry face', + ':D':'lought' + }, +} From 622e12b9c5c3f0d8d474b533bf54bf43ca0d58fc Mon Sep 17 00:00:00 2001 From: root Date: Wed, 12 Oct 2016 21:38:08 +0200 Subject: [PATCH 03/15] initial punctuation and dict import --- config/settings/settings.conf.chrys | 1 + config/settings/settings.conf.orig | 1 + config/settings/settings.conf.storm | 1 + 3 files changed, 3 insertions(+) diff --git a/config/settings/settings.conf.chrys b/config/settings/settings.conf.chrys index 13b249be..c8d30263 100644 --- a/config/settings/settings.conf.chrys +++ b/config/settings/settings.conf.chrys @@ -97,6 +97,7 @@ doubleTapDelay=0.2 [general] debugLevel=1 +punctuationProfile=default punctuationLevel=Some numberOfClipboards=10 # define the current fenrir key diff --git a/config/settings/settings.conf.orig b/config/settings/settings.conf.orig index 14873be5..0f17bb6a 100644 --- a/config/settings/settings.conf.orig +++ b/config/settings/settings.conf.orig @@ -95,6 +95,7 @@ doubleTapDelay=0.2 [general] debugLevel=0 +punctuationProfile=default punctuationLevel=some numberOfClipboards=10 # define the current fenrir key diff --git a/config/settings/settings.conf.storm b/config/settings/settings.conf.storm index 4ee95f1e..df2d9f1a 100644 --- a/config/settings/settings.conf.storm +++ b/config/settings/settings.conf.storm @@ -48,6 +48,7 @@ doubleTapDelay=0.2 [general] debugLevel=0 +punctuationProfile=default punctuationLevel=some numberOfClipboards=10 fenrirKeys=KEY_KP0 From fcf212d715e2bc6cc44b344198c21e522a06ed8a Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 21:45:27 +0200 Subject: [PATCH 04/15] harderner config importer --- src/fenrir/core/settingsManager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 2966e49a..0d1ad1d9 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -108,8 +108,12 @@ class settingsManager(): if not ":===:" in line: continue sepLine = line.split(':===:') - if len(sepLine) != 2: + if len(sepLine) == 1: sepLine.append('') + elif len(sepLine) < 1: + continue + elif len(sepLine) > 2: + sepLine[1] = ':===:' self.env['punctuation'][currDictName][sepLine[0]] = sepLine[1] self.env['runtime']['debug'].writeDebugOut("Punctuation: " + currDictName + '.' + str(sepLine[0]) + ' :' + sepLine[1] ,debug.debugLevel.INFO) dictConfig.close() From f817c126183dc6def210ade95d4e7a54bd90147e Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 22:14:18 +0200 Subject: [PATCH 05/15] fix custom dict --- src/fenrir/core/punctuation.py | 2 +- src/fenrir/core/punctuationManager.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fenrir/core/punctuation.py b/src/fenrir/core/punctuation.py index 960d92e2..23d3a95f 100644 --- a/src/fenrir/core/punctuation.py +++ b/src/fenrir/core/punctuation.py @@ -49,7 +49,7 @@ punctuation = { '=':'equals', }, 'CUSTOMDICT':{ - 'chrys': 'king chrys' + 'chrys': 'nice chrys' }, 'EMOJDICT':{ ':)':'smiley', diff --git a/src/fenrir/core/punctuationManager.py b/src/fenrir/core/punctuationManager.py index 74465d82..50f92195 100644 --- a/src/fenrir/core/punctuationManager.py +++ b/src/fenrir/core/punctuationManager.py @@ -38,8 +38,9 @@ class punctuationManager(): return resultText def proceedPunctuation(self, text, ignorePunctuation=False): - resultText = self.useCustomDict(text, self.env['punctuation']['CUSTOMDICT']) - resultText = self.useCustomDict(text, self.env['punctuation']['EMOJDICT']) + resultText = text + resultText = self.useCustomDict(resultText, self.env['punctuation']['CUSTOMDICT']) + resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJDICT']) currPunctLevel = '' if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']: currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()] From bc396a92236a09ec82f6c5b42e8673b6f14986bc Mon Sep 17 00:00:00 2001 From: root Date: Wed, 12 Oct 2016 22:22:02 +0200 Subject: [PATCH 06/15] add toggle_emoticon --- config/keyboard/desktop.conf | 1 + config/keyboard/laptop.conf | 1 + config/keyboard/test.conf | 1 + config/settings/settings.conf | 1 + config/settings/settings.conf.chrys | 1 + config/settings/settings.conf.orig | 1 + config/settings/settings.conf.storm | 1 + .../commands/commands/toggle_emoticons.py | 26 +++++++++++++++++++ src/fenrir/core/punctuationManager.py | 3 ++- src/fenrir/core/settings.py | 1 + 10 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/fenrir/commands/commands/toggle_emoticons.py diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index d5fe4d40..960a09db 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -66,6 +66,7 @@ KEY_FENRIR,KEY_F4=toggle_speech KEY_FENRIR,KEY_CTRL,KEY_P=toggle_punctuation_level KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check KEY_FENRIR,KEY_BACKSLASH=toggle_output +#=toggle_emoticons key_FENRIR,KEY_KPENTER=toggle_auto_read KEY_FENRIR,KEY_Q=quit_fenrir KEY_FENRIR,KEY_T=time diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index d85e04f7..d51f9c59 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -66,6 +66,7 @@ KEY_FENRIR,KEY_F4=toggle_speech KEY_FENRIR,KEY_SHIFT,KEY_CTRL,KEY_P=toggle_punctuation_level KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check KEY_FENRIR,KEY_SHIFT,KEY_ENTER=toggle_output +#=toggle_emoticons KEY_FENRIR,KEY_ENTER=toggle_auto_read KEY_FENRIR,KEY_Q=quit_fenrir KEY_FENRIR,KEY_T=time diff --git a/config/keyboard/test.conf b/config/keyboard/test.conf index d5fe4d40..960a09db 100644 --- a/config/keyboard/test.conf +++ b/config/keyboard/test.conf @@ -66,6 +66,7 @@ KEY_FENRIR,KEY_F4=toggle_speech KEY_FENRIR,KEY_CTRL,KEY_P=toggle_punctuation_level KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check KEY_FENRIR,KEY_BACKSLASH=toggle_output +#=toggle_emoticons key_FENRIR,KEY_KPENTER=toggle_auto_read KEY_FENRIR,KEY_Q=quit_fenrir KEY_FENRIR,KEY_T=time diff --git a/config/settings/settings.conf b/config/settings/settings.conf index ad76400e..e5a75410 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -100,6 +100,7 @@ debugLevel=3 punctuationProfile=default punctuationLevel=some numberOfClipboards=10 +emoticons=True # define the current fenrir key fenrirKeys=KEY_KP0,KEY_META timeFormat=%H:%M:%P diff --git a/config/settings/settings.conf.chrys b/config/settings/settings.conf.chrys index c8d30263..cfb9f818 100644 --- a/config/settings/settings.conf.chrys +++ b/config/settings/settings.conf.chrys @@ -100,6 +100,7 @@ debugLevel=1 punctuationProfile=default punctuationLevel=Some numberOfClipboards=10 +emoticons=True # define the current fenrir key fenrirKeys=KEY_KP0,KEY_META timeFormat=%H:%M:%P diff --git a/config/settings/settings.conf.orig b/config/settings/settings.conf.orig index 0f17bb6a..5843144e 100644 --- a/config/settings/settings.conf.orig +++ b/config/settings/settings.conf.orig @@ -98,6 +98,7 @@ debugLevel=0 punctuationProfile=default punctuationLevel=some numberOfClipboards=10 +emoticons=True # define the current fenrir key fenrirKeys=KEY_KP0,KEY_META timeFormat=%H:%M%P diff --git a/config/settings/settings.conf.storm b/config/settings/settings.conf.storm index df2d9f1a..892f1261 100644 --- a/config/settings/settings.conf.storm +++ b/config/settings/settings.conf.storm @@ -51,6 +51,7 @@ debugLevel=0 punctuationProfile=default punctuationLevel=some numberOfClipboards=10 +emoticons=True fenrirKeys=KEY_KP0 timeFormat=%H:%M:%P dateFormat="%A, %B %d, %Y" diff --git a/src/fenrir/commands/commands/toggle_emoticons.py b/src/fenrir/commands/commands/toggle_emoticons.py new file mode 100644 index 00000000..fc1872df --- /dev/null +++ b/src/fenrir/commands/commands/toggle_emoticons.py @@ -0,0 +1,26 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return 'enables or disables announcement of emoticons insteed of chars' + + def run(self): + self.env['runtime']['settingsManager'].setSetting('general', 'emoticons', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons'))) + if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons'): + self.env['runtime']['outputManager'].presentText("emoticons enabled", soundIcon='', interrupt=True) + else: + self.env['runtime']['outputManager'].presentText("emoticons disabled", soundIcon='', interrupt=True) + + def setCallback(self, callback): + pass diff --git a/src/fenrir/core/punctuationManager.py b/src/fenrir/core/punctuationManager.py index 50f92195..b287571a 100644 --- a/src/fenrir/core/punctuationManager.py +++ b/src/fenrir/core/punctuationManager.py @@ -40,7 +40,8 @@ class punctuationManager(): def proceedPunctuation(self, text, ignorePunctuation=False): resultText = text resultText = self.useCustomDict(resultText, self.env['punctuation']['CUSTOMDICT']) - resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJDICT']) + if self.env['runtime']['settingsManager'].getSetting('general', 'emoticons'): + resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJDICT']) currPunctLevel = '' if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']: currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()] diff --git a/src/fenrir/core/settings.py b/src/fenrir/core/settings.py index 13e4895b..7f59ce7e 100644 --- a/src/fenrir/core/settings.py +++ b/src/fenrir/core/settings.py @@ -44,6 +44,7 @@ settings = { 'punctuationProfile':'default', 'punctuationLevel': 1, 'numberOfClipboards': 10, + 'emoticons': True, 'fenrirKeys': ['KEY_KP0'], 'timeFormat': '%I:%M%P', 'dateFormat': '%A, %B %d, %Y', From d6e9676c8cfb1517387f053e2970117aaf8ff9ae Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 22:27:29 +0200 Subject: [PATCH 07/15] typo --- config/punctuation/default.conf | 2 +- src/fenrir/core/punctuationManager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/punctuation/default.conf b/config/punctuation/default.conf index 17dc7b9e..e9de8496 100644 --- a/config/punctuation/default.conf +++ b/config/punctuation/default.conf @@ -45,7 +45,7 @@ _:===:line [customDict] chrys:===:king chrys -[emojDict] +[emojiDict] :):===:smile ;):===:twinker XD:===:loool diff --git a/src/fenrir/core/punctuationManager.py b/src/fenrir/core/punctuationManager.py index b287571a..d7c24438 100644 --- a/src/fenrir/core/punctuationManager.py +++ b/src/fenrir/core/punctuationManager.py @@ -41,7 +41,7 @@ class punctuationManager(): resultText = text resultText = self.useCustomDict(resultText, self.env['punctuation']['CUSTOMDICT']) if self.env['runtime']['settingsManager'].getSetting('general', 'emoticons'): - resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJDICT']) + resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJIDICT']) currPunctLevel = '' if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']: currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()] From f42ae05e550751d1014dac6cc61b246c435ffa12 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 22:33:41 +0200 Subject: [PATCH 08/15] typo --- config/punctuation/default.conf | 2 +- src/fenrir/core/punctuationManager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/punctuation/default.conf b/config/punctuation/default.conf index e9de8496..39e62639 100644 --- a/config/punctuation/default.conf +++ b/config/punctuation/default.conf @@ -45,7 +45,7 @@ _:===:line [customDict] chrys:===:king chrys -[emojiDict] +[emoticonDict] :):===:smile ;):===:twinker XD:===:loool diff --git a/src/fenrir/core/punctuationManager.py b/src/fenrir/core/punctuationManager.py index d7c24438..477fcd60 100644 --- a/src/fenrir/core/punctuationManager.py +++ b/src/fenrir/core/punctuationManager.py @@ -41,7 +41,7 @@ class punctuationManager(): resultText = text resultText = self.useCustomDict(resultText, self.env['punctuation']['CUSTOMDICT']) if self.env['runtime']['settingsManager'].getSetting('general', 'emoticons'): - resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOJIDICT']) + resultText = self.useCustomDict(resultText, self.env['punctuation']['EMOTICONDICT']) currPunctLevel = '' if not ignorePunctuation and self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower() in self.env['punctuation']['LEVELDICT']: currPunctLevel = self.env['punctuation']['LEVELDICT'][self.env['runtime']['settingsManager'].getSetting('general', 'punctuationLevel').lower()] From 7d457e6d5413d3c20cc0d2c784173cc05f8fb843 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 22:35:00 +0200 Subject: [PATCH 09/15] typo --- src/fenrir/core/punctuation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fenrir/core/punctuation.py b/src/fenrir/core/punctuation.py index 23d3a95f..9045a227 100644 --- a/src/fenrir/core/punctuation.py +++ b/src/fenrir/core/punctuation.py @@ -51,7 +51,7 @@ punctuation = { 'CUSTOMDICT':{ 'chrys': 'nice chrys' }, -'EMOJDICT':{ +'EMOTICONDICT':{ ':)':'smiley', ';)':'winking face', 'XD':'loool', From f785b3e6db71c04593b5cc95c85679c871e3e940 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 22:56:02 +0200 Subject: [PATCH 10/15] replace own implementation of from_device by new mainstream function --- src/fenrir/inputDriver/evdev.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/fenrir/inputDriver/evdev.py b/src/fenrir/inputDriver/evdev.py index 33976591..f878a65e 100644 --- a/src/fenrir/inputDriver/evdev.py +++ b/src/fenrir/inputDriver/evdev.py @@ -118,19 +118,8 @@ class driver(): def grabDevices(self): for fd in self.iDevices: - dev = self.iDevices[fd] - cap = dev.capabilities() - del cap[0] - self.uDevices[fd] = UInput( - cap, - dev.name, - #dev.info.vendor, - #dev.info.product, - #dev.version, - #dev.info.bustype, - #'/dev/uinput' - ) - dev.grab() + self.uDevices[fd] = UInput.from_device(self.iDevices[fd].fn) + self.iDevices[fd].grab() def releaseDevices(self): for fd in self.iDevices: From 876be9a6d3488cb0c09f2e74123a5a30d435b181 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 23:14:58 +0200 Subject: [PATCH 11/15] improve debug --- src/fenrir/core/commandManager.py | 5 ++--- src/fenrir/core/debug.py | 13 +++++++++---- src/fenrir/core/settingsManager.py | 13 +++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/fenrir/core/commandManager.py b/src/fenrir/core/commandManager.py index 1822066a..36d8d97f 100644 --- a/src/fenrir/core/commandManager.py +++ b/src/fenrir/core/commandManager.py @@ -34,10 +34,9 @@ class commandManager(): commandList = glob.glob(commandFolder+'*') for command in commandList: try: - print(command) fileName, fileExtension = os.path.splitext(command) fileName = fileName.split('/')[-1] - if fileName in ['__init__','__pycache__']: + if fileName.startswith('__'): continue if fileExtension.lower() == '.py': spec = importlib.util.spec_from_file_location(fileName, command) @@ -46,7 +45,7 @@ class commandManager(): self.env['commands'][section][fileName.upper()] = command_mod.command() self.env['commandsIgnore'][section][fileName.upper()[fileName.upper().find('-')+1:]+'_IGNORE'] = False self.env['commands'][section][fileName.upper()].initialize(self.env) - self.env['runtime']['debug'].writeDebugOut("Load command:" + section + "." + fileName.upper() ,debug.debugLevel.INFO) + self.env['runtime']['debug'].writeDebugOut("Load command:" + section + "." + fileName.upper() ,debug.debugLevel.INFO, onAnyLevel=True) except Exception as e: print(e) self.env['runtime']['debug'].writeDebugOut("Loading command:" + command ,debug.debugLevel.ERROR) diff --git a/src/fenrir/core/debug.py b/src/fenrir/core/debug.py index 9b64b035..0935af91 100644 --- a/src/fenrir/core/debug.py +++ b/src/fenrir/core/debug.py @@ -37,16 +37,21 @@ class debug(): self._file = open(self._fileName,'a') self._fileOpened = True - def writeDebugOut(self, text, level = debugLevel.DEACTIVE): - if self.env['runtime']['settingsManager'].getSettingAsInt('general','debugLevel') < int(level): + def writeDebugOut(self, text, level = debugLevel.DEACTIVE, onAnyLevel=False): + if (self.env['runtime']['settingsManager'].getSettingAsInt('general','debugLevel') < int(level)) or \ + not (onAnyLevel and self.env['runtime']['settingsManager'].getSettingAsInt('general','debugLevel') > int(debugLevel.DEACTIVE)) : if self._fileOpened: self.closeDebugFile() return else: if not self._fileOpened: self.openDebugFile() - msg = str(level) +' ' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f') -) + ': ' + text + if onAnyLevel: + msg = 'INFO ' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f')) + else: + msg = str(level) +' ' + str(datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S.%f') +) + msg += ': ' + text print(msg) self._file.write(msg + '\n') diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 0d1ad1d9..ec345864 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -55,7 +55,7 @@ class settingsManager(): shortcutKeys.append(key.upper()) shortcut.append(shortcutRepeat) shortcut.append(sorted(shortcutKeys)) - self.env['runtime']['debug'].writeDebugOut("Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO) + self.env['runtime']['debug'].writeDebugOut("Shortcut: "+ str(shortcut) + ' command:' +commandName ,debug.debugLevel.INFO, onAnyLevel=True) self.env['bindings'][str(shortcut)] = commandName kbConfig.close() @@ -85,6 +85,7 @@ class settingsManager(): if os.path.exists(soundIconPath + Values[1]): soundIconFile = soundIconPath + Values[1] self.env['soundIcons'][soundIcon] = soundIconFile + self.env['runtime']['debug'].writeDebugOut("SoundIcon: " + soundIcon + '.' + soundIconFile, debug.debugLevel.INFO, onAnyLevel=True) siConfig.close() def loadDicts(self, dictConfigPath=os.path.dirname(os.path.realpath(__main__.__file__)) + '/../../config/punctuation/default.conf'): @@ -115,7 +116,7 @@ class settingsManager(): elif len(sepLine) > 2: sepLine[1] = ':===:' self.env['punctuation'][currDictName][sepLine[0]] = sepLine[1] - self.env['runtime']['debug'].writeDebugOut("Punctuation: " + currDictName + '.' + str(sepLine[0]) + ' :' + sepLine[1] ,debug.debugLevel.INFO) + self.env['runtime']['debug'].writeDebugOut("Punctuation: " + currDictName + '.' + str(sepLine[0]) + ' :' + sepLine[1] ,debug.debugLevel.INFO, onAnyLevel=True) dictConfig.close() def loadSettings(self, settingConfigPath): @@ -251,10 +252,10 @@ class settingsManager(): environment['runtime']['screenManager'] = screenManager.screenManager() environment['runtime']['screenManager'].initialize(environment) - environment['runtime']['debug'].writeDebugOut('\/-------environment-------\/',debug.debugLevel.ERROR) - environment['runtime']['debug'].writeDebugOut(str(environment),debug.debugLevel.ERROR) - environment['runtime']['debug'].writeDebugOut('\/-------settings.conf-------\/',debug.debugLevel.ERROR) + environment['runtime']['debug'].writeDebugOut('\/-------environment-------\/',debug.debugLevel.INFO, onAnyLevel=True) + environment['runtime']['debug'].writeDebugOut(str(environment),debug.debugLevel.INFO, onAnyLevel=True) + environment['runtime']['debug'].writeDebugOut('\/-------settings.conf-------\/',debug.debugLevel.INFO, onAnyLevel=True) environment['runtime']['debug'].writeDebugOut(str(environment['settings']._sections -),debug.debugLevel.ERROR) +),debug.debugLevel.INFO, onAnyLevel=True) return environment From d7d3133b108087288c222d676dbe2ac4d7d73f1b Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 12 Oct 2016 23:47:34 +0200 Subject: [PATCH 12/15] fix toggle punctuation --- config/punctuation/default.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/punctuation/default.conf b/config/punctuation/default.conf index 39e62639..5cd85478 100644 --- a/config/punctuation/default.conf +++ b/config/punctuation/default.conf @@ -3,10 +3,10 @@ # the different sections are seperated by [Dict] is the section name. Dict is a keyword # the entrys are seperated with :===: in words colon tripple equal colon ( to not collide with substitutions) [levelDict] -None:===: -Some:===:.-$~+*-/\\@ -Most:===:.,:-$~+*-/\\@!#%^&*()[]}{<>; -All:===:!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ +none:===: +some:===:.-$~+*-/\\@ +most:===:.,:-$~+*-/\\@!#%^&*()[]}{<>; +all:===:!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ [punctDict] &:===:and From c80e93abab1d2354bbb5948b4eee8ed48eb80478 Mon Sep 17 00:00:00 2001 From: chrys Date: Thu, 13 Oct 2016 00:05:05 +0200 Subject: [PATCH 13/15] respect doubleTapDelay --- src/fenrir/core/inputManager.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/fenrir/core/inputManager.py b/src/fenrir/core/inputManager.py index 325d8a34..c8003ba9 100644 --- a/src/fenrir/core/inputManager.py +++ b/src/fenrir/core/inputManager.py @@ -41,7 +41,8 @@ class inputManager(): self.env['input']['currInput'] = sorted(self.env['input']['currInput']) if len(self.env['input']['currInput']) == 0: self.env['input']['prevDeepestInput'] = [] - self.env['input']['shortcutRepeat'] = 1 + self.env['input']['shortcutRepeat'] = 1 + self.env['input']['lastInputTime'] = time.time() elif mEvent['EventState'] == 1: if not mEvent['EventName'] in self.env['input']['currInput']: self.env['input']['currInput'].append(mEvent['EventName']) @@ -50,8 +51,11 @@ class inputManager(): if len(self.env['input']['prevDeepestInput']) < len(self.env['input']['currInput']): self.env['input']['prevDeepestInput'] = self.env['input']['currInput'].copy() elif self.env['input']['prevDeepestInput'] == self.env['input']['currInput']: - self.env['input']['shortcutRepeat'] += 1 - + if time.time() - self.env['input']['lastInputTime'] <= self.env['runtime']['settingsManager'].getSettingAsFloat('keyboard','doubleTapDelay'): + self.env['input']['shortcutRepeat'] += 1 + else: + self.env['input']['shortcutRepeat'] = 1 + self.env['input']['lastInputTime'] = time.time() elif mEvent['EventState'] == 2: pass else: @@ -62,7 +66,7 @@ class inputManager(): self.env['input']['newCapsLock'] = self.env['runtime']['inputDriver'].getCapslock() self.env['input']['oldScrollLock'] = self.env['input']['newScrollLock'] self.env['input']['newScrollLock'] = self.env['runtime']['inputDriver'].getScrollLock() - self.env['input']['lastInputTime'] = time.time() + return eventReceived def grabDevices(self): From 1e1510dd547c04a156eb934b2b10c5a5b923a8b0 Mon Sep 17 00:00:00 2001 From: chrys Date: Thu, 13 Oct 2016 00:30:07 +0200 Subject: [PATCH 14/15] leve the old code until the new one is better tested --- src/fenrir/inputDriver/evdev.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/fenrir/inputDriver/evdev.py b/src/fenrir/inputDriver/evdev.py index f878a65e..134c7703 100644 --- a/src/fenrir/inputDriver/evdev.py +++ b/src/fenrir/inputDriver/evdev.py @@ -117,6 +117,21 @@ class driver(): return False def grabDevices(self): +# leve the old code until the new one is better tested +# for fd in self.iDevices: +# dev = self.iDevices[fd] +# cap = dev.capabilities() +# del cap[0] +# self.uDevices[fd] = UInput( +# cap, +# dev.name, +# #dev.info.vendor, +# #dev.info.product, +# #dev.version, +# #dev.info.bustype, +# #'/dev/uinput' +# ) +# dev.grab() for fd in self.iDevices: self.uDevices[fd] = UInput.from_device(self.iDevices[fd].fn) self.iDevices[fd].grab() From 3c80e5c0a437c3e54b56bc023cdbfc821b9658c2 Mon Sep 17 00:00:00 2001 From: chrys Date: Thu, 13 Oct 2016 00:35:03 +0200 Subject: [PATCH 15/15] rename doubleTapDelay to doubleTapTimeout --- config/settings/settings.conf | 2 +- config/settings/settings.conf.chrys | 2 +- config/settings/settings.conf.orig | 2 +- config/settings/settings.conf.storm | 2 +- src/fenrir/core/inputManager.py | 2 +- src/fenrir/core/settings.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/settings/settings.conf b/config/settings/settings.conf index e5a75410..cb6437aa 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -93,7 +93,7 @@ wordEcho=False # interrupt speech on any keypress interruptOnKeyPress=False # timeout for double tap in sec -doubleTapDelay=0.2 +doubleTapTimeout=0.2 [general] debugLevel=3 diff --git a/config/settings/settings.conf.chrys b/config/settings/settings.conf.chrys index cfb9f818..ff6b691c 100644 --- a/config/settings/settings.conf.chrys +++ b/config/settings/settings.conf.chrys @@ -93,7 +93,7 @@ wordEcho=False # interrupt speech on any keypress interruptOnKeyPress=False # timeout for double tap in sec -doubleTapDelay=0.2 +doubleTapTimeout=0.2 [general] debugLevel=1 diff --git a/config/settings/settings.conf.orig b/config/settings/settings.conf.orig index 5843144e..d63c3fe6 100644 --- a/config/settings/settings.conf.orig +++ b/config/settings/settings.conf.orig @@ -91,7 +91,7 @@ wordEcho=True # interrupt speech on any keypress interruptOnKeyPress=False # timeout for double tap in sec -doubleTapDelay=0.2 +doubleTapTimeout=0.2 [general] debugLevel=0 diff --git a/config/settings/settings.conf.storm b/config/settings/settings.conf.storm index 892f1261..1a8f1a0f 100644 --- a/config/settings/settings.conf.storm +++ b/config/settings/settings.conf.storm @@ -44,7 +44,7 @@ charDeleteEcho=True wordEcho=False interruptOnKeyPress=True # timeout for double tap in sec -doubleTapDelay=0.2 +doubleTapTimeout=0.2 [general] debugLevel=0 diff --git a/src/fenrir/core/inputManager.py b/src/fenrir/core/inputManager.py index c8003ba9..62d0414a 100644 --- a/src/fenrir/core/inputManager.py +++ b/src/fenrir/core/inputManager.py @@ -51,7 +51,7 @@ class inputManager(): if len(self.env['input']['prevDeepestInput']) < len(self.env['input']['currInput']): self.env['input']['prevDeepestInput'] = self.env['input']['currInput'].copy() elif self.env['input']['prevDeepestInput'] == self.env['input']['currInput']: - if time.time() - self.env['input']['lastInputTime'] <= self.env['runtime']['settingsManager'].getSettingAsFloat('keyboard','doubleTapDelay'): + if time.time() - self.env['input']['lastInputTime'] <= self.env['runtime']['settingsManager'].getSettingAsFloat('keyboard','doubleTapTimeout'): self.env['input']['shortcutRepeat'] += 1 else: self.env['input']['shortcutRepeat'] = 1 diff --git a/src/fenrir/core/settings.py b/src/fenrir/core/settings.py index 7f59ce7e..adbbabc0 100644 --- a/src/fenrir/core/settings.py +++ b/src/fenrir/core/settings.py @@ -66,6 +66,6 @@ settings = { 'charDeleteEcho': True, 'wordEcho': True, 'interruptOnKeyPress': True, - 'doubleTapDelay': 0.2, + 'doubleTapTimeout': 0.2, } }