omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. DOGGY
    3. Best

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 4
    • Best 1
    • Controversial 0
    • Groups 0

    Best posts made by DOGGY

    • RE: Check multi-keys press

      @yaley ok. How about using pygame module? It might work :

      import pygame
      screen = pygame.display.set_mode((0,0,320,320))
      while True:
          for event in pygame.event.get():
              if event.type == pygame.KEYDOWN or event.type == pygame.KEYUP:
                  if event.mod == pygame.KMOD_NONE:
                      print('No modifier keys were in a pressed state when this '
                        'event occurred.')
                  else:
                      if event.mod & pygame.KMOD_LSHIFT:
                           print('Left shift was in a pressed state when this event '
                            'occurred.')
                      if event.mod & pygame.KMOD_RSHIFT:
                           print('Right shift was in a pressed state when this event '
                            'occurred.')
                      if event.mod & pygame.KMOD_SHIFT:
                          print('Left shift or right shift or both were in a '
                            'pressed state when this event occurred.') 
      
      posted in Pythonista
      DOGGY
      DOGGY