What is the shortcut to the "C" key in Pygame?

Asked

Viewed 57 times

-1

You can use this key with the Event.key method?

What is the key call?

I am developing a simple and accurate Synth of sounds of as many input keys as possible.

import pygame

if event.key == K_v:
    print("You pressed the key 'v'")

if event.key == ???
    print("You pressed the key 'ç'")
  • 1

    trial K_QUOTE | K_c . Add a [mcve] to the question so people can replicate your problem and experience your difficulty. Also see How we should format questions and answers?

  • Thanks for the posting tips. Didn’t roll with K_QUOTE | K_c.

  • 1

    pq vc does not print key code?

  • 1

    prints the key pressed and uses her code if event.type == pygame.KEYDOWN: print(event) or if event.type == pygame.KEYDOWN: print(event.key), after knowing the number, just use (do not use keyboard abnt2 to tell you the code). if event.key == 97: something() 97 is key 'A'

  • @iuridiniz de facto. And then itself can create a K_CCEDIL constant (or something like that) with the value found to be readable in the code.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.