diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index dd38fb0b..8d4735a0 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -30,6 +30,7 @@ 1-FENRIR,1-KEY_D=date #=spell_check #=add_word_to_spell_check +#=remove_word_from_spell_check #=foreward_keypress #=inc_speech_volume #=dec_speech_volume diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index 67fce7af..f8ffdd51 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -30,6 +30,7 @@ #=date #=spell_check #=add_word_to_spell_check +#=remove_word_from_spell_check #=foreward_keypress #=inc_speech_volume #=dec_speech_volume diff --git a/config/keyboard/test.conf b/config/keyboard/test.conf index d5222512..9c8df0b4 100644 --- a/config/keyboard/test.conf +++ b/config/keyboard/test.conf @@ -30,6 +30,7 @@ 1-FENRIR,1-KEY_R=date 1-FENRIR,1-KEY_M=spell_check 1-FENRIR,1-KEY_G=add_word_to_spell_check +#=remove_word_from_spell_check 1-FENRIR,1-KEY_A=foreward_keypress #1-FENRIR,1-KEY_F2=inc_speech_volume #1-FENRIR,1-KEY_F3=dec_sound_volume diff --git a/src/fenrir-package/commands/commands/add_word_to_spell_check.py b/src/fenrir-package/commands/commands/add_word_to_spell_check.py index 656a811f..8b6e492c 100644 --- a/src/fenrir-package/commands/commands/add_word_to_spell_check.py +++ b/src/fenrir-package/commands/commands/add_word_to_spell_check.py @@ -33,14 +33,11 @@ class command(): x, y, currWord = word_utils.getCurrentWord(cursorPos['x'], 0, newContent) if currWord != '': - if self.spellChecker.check(currWord): - environment['runtime']['outputManager'].presentText(environment, 'not misspelled',soundIcon='mispell', interrupt=True) + if self.spellChecker.is_added(currWord): + environment['runtime']['outputManager'].presentText(environment, currWord + ' is already in dict',soundIcon='Cancel', interrupt=True) else: - if self.spellChecker.is_added(currWord): - environment['runtime']['outputManager'].presentText(environment, 'not misspelled',soundIcon='Cancel', interrupt=True) - else: - self.spellChecker.add(currWord) - environment['runtime']['outputManager'].presentText(environment, currWord + ' added',soundIcon='Accept', interrupt=True) + self.spellChecker.add(currWord) + environment['runtime']['outputManager'].presentText(environment, currWord + ' added',soundIcon='Accept', interrupt=True) return environment def setCallback(self, callback):