add initial keyforwart for new input handling
This commit is contained in:
parent
e02b33f653
commit
6ae0cd85fa
@ -39,7 +39,7 @@ KEY_FENRIR,KEY_T=time
|
|||||||
KEY_FENRIR,KEY_S=spell_check
|
KEY_FENRIR,KEY_S=spell_check
|
||||||
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
||||||
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
||||||
KEY_FENRIR,KEY_BACKSPACE=foreward_keypress
|
KEY_FENRIR,KEY_BACKSPACE=forward_keypress
|
||||||
KEY_FENRIR,KEY_UP=inc_speech_volume
|
KEY_FENRIR,KEY_UP=inc_speech_volume
|
||||||
KEY_FENRIR,KEY_DOWN=dec_speech_volume
|
KEY_FENRIR,KEY_DOWN=dec_speech_volume
|
||||||
KEY_FENRIR,KEY_RIGHT=inc_speech_rate
|
KEY_FENRIR,KEY_RIGHT=inc_speech_rate
|
||||||
|
@ -39,7 +39,7 @@ KEY_FENRIR,KEY_T=time
|
|||||||
KEY_FENRIR,KEY_S=spell_check
|
KEY_FENRIR,KEY_S=spell_check
|
||||||
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
2,KEY_FENRIR,KEY_S=add_word_to_spell_check
|
||||||
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
KEY_FENRIR,KEY_SHIFT,KEY_S=remove_word_from_spell_check
|
||||||
KEY_FENRIR,KEY_BACKSPACE=foreward_keypress
|
KEY_FENRIR,KEY_BACKSPACE=forward_keypress
|
||||||
KEY_FENRIR,KEY_UP=inc_speech_volume
|
KEY_FENRIR,KEY_UP=inc_speech_volume
|
||||||
KEY_FENRIR,KEY_DOWN=dec_speech_volume
|
KEY_FENRIR,KEY_DOWN=dec_speech_volume
|
||||||
KEY_FENRIR,KEY_RIGHT=inc_speech_rate
|
KEY_FENRIR,KEY_RIGHT=inc_speech_rate
|
||||||
|
@ -17,7 +17,7 @@ class command():
|
|||||||
return 'sends the following keypress to the terminal'
|
return 'sends the following keypress to the terminal'
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.env['input']['keyForeward'] = 2
|
self.env['input']['keyForeward'] = 3
|
||||||
self.env['runtime']['outputManager'].presentText('Foreward next keypress', interrupt=True)
|
self.env['runtime']['outputManager'].presentText('Foreward next keypress', interrupt=True)
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
|
@ -51,6 +51,8 @@ class fenrir():
|
|||||||
self.environment['runtime']['inputManager'].clearEventBuffer()
|
self.environment['runtime']['inputManager'].clearEventBuffer()
|
||||||
if self.environment['generalInformation']['tutorialMode']:
|
if self.environment['generalInformation']['tutorialMode']:
|
||||||
self.environment['runtime']['inputManager'].clearEventBuffer()
|
self.environment['runtime']['inputManager'].clearEventBuffer()
|
||||||
|
if self.environment['input']['keyForeward'] > 0:
|
||||||
|
self.environment['input']['keyForeward'] -=1
|
||||||
self.environment['input']['prevDeepestInput'] = []
|
self.environment['input']['prevDeepestInput'] = []
|
||||||
self.environment['runtime']['screenManager'].update()
|
self.environment['runtime']['screenManager'].update()
|
||||||
|
|
||||||
@ -72,7 +74,7 @@ class fenrir():
|
|||||||
self.handleCommands()
|
self.handleCommands()
|
||||||
|
|
||||||
def prepareCommand(self):
|
def prepareCommand(self):
|
||||||
if self.environment['input']['keyForeward']:
|
if self.environment['input']['keyForeward'] > 0:
|
||||||
return
|
return
|
||||||
shortcut = self.environment['runtime']['inputManager'].getCurrShortcut()
|
shortcut = self.environment['runtime']['inputManager'].getCurrShortcut()
|
||||||
print(shortcut)
|
print(shortcut)
|
||||||
|
Loading…
Reference in New Issue
Block a user