diff --git a/__init__.py b/__init__.py index 059c39a..844af8b 100755 --- a/__init__.py +++ b/__init__.py @@ -687,11 +687,11 @@ def display_text(text): if event.key in (pygame.K_ESCAPE, pygame.K_RETURN): return - if event.key == pygame.K_DOWN and currentIndex < len(text) - 1: + if event.key in [pygame.K_DOWN, pygame.K_s] and currentIndex < len(text) - 1: currentIndex += 1 speak(text[currentIndex]) - if event.key == pygame.K_UP and currentIndex > 0: + if event.key in [pygame.K_UP,pygame.K_w] and currentIndex > 0: currentIndex -= 1 speak(text[currentIndex]) @@ -798,11 +798,11 @@ def learn_sounds(sounds): if event.key == pygame.K_ESCAPE: return "menu" - if event.key == pygame.K_DOWN and currentIndex < len(soundFiles) - 1: + if event.key == [pygame.K_DOWN, pygame.K_s] and currentIndex < len(soundFiles) - 1: pygame.mixer.stop() currentIndex += 1 - if event.key == pygame.K_UP and currentIndex > 0: + if event.key in [pygame.K_UP, pygame.K_w] and currentIndex > 0: pygame.mixer.stop() currentIndex -= 1 @@ -890,7 +890,7 @@ def game_menu(sounds, *options): # Menu navigation elif event.key == pygame.K_ESCAPE: exit_game() - elif event.key == pygame.K_DOWN and currentIndex < len(options) - 1: + elif event.key in [pygame.K_DOWN, pygame.K_s] and currentIndex < len(options) - 1: currentIndex += 1 try: sounds['menu-move'].play() @@ -898,7 +898,7 @@ def game_menu(sounds, *options): pass if options[currentIndex] != "donate": pygame.mixer.music.unpause() - elif event.key == pygame.K_UP and currentIndex > 0: + elif event.key in [pygame.K_UP, pygame.K_w] and currentIndex > 0: currentIndex -= 1 try: sounds['menu-move'].play()