[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] How to send a keyboard event ?
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] How to send a keyboard event ?
- From: René Dudfield <renesd@xxxxxxxxx>
- Date: Wed, 11 Nov 2009 18:23:40 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 11 Nov 2009 12:23:42 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=8xpV5mBlTcgX1J2+iDe7aooqHE9oFkucEqOH5icma70=; b=f3tXk4bH/jA8AcOqlZ5/vnJluhWdSpPbByN/ur9663f3JSflA9N9fx3zXOqruxKUIW 9qUQUq59qQrqae2T6Qo2MyRwdFJiEKVqpKG8VEwMIWphjwDE5J+PFa7D/MrBp35l2xxl oHuf7MwAVqlK6pBARcmDopYoS7onCNobbNsy4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=JQzRVU88g4zQ+Ze9rB0GdaB8qIcEpxTOlvbFlmzPRQ+qLqvBqbRRPLWzAqUxFGBw58 +kBb8/2h5NxQEXlnUPdb8YMJegioD8gCgeDmrSc5Sf4kmwsLk6Ac5OGnVfAfG4pQIrfQ 6HxO2OVTtxuj4dHeE2nx/WOLIJoANj4qlO3/g=
- In-reply-to: <BLU0-SMTP6993EE1A4D027214F19D0B89AA0@xxxxxxx>
- References: <BLU0-SMTP6993EE1A4D027214F19D0B89AA0@xxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
yeah,
you can post in events with:
pygame.event.post(Event(KEYDOWN, key=K_KP_PLUS))
cu,
On Wed, Nov 11, 2009 at 5:59 PM, PierreLafrance1@xxxxxxxxxxxx
<PierreLafrance1@xxxxxxxxxxxx> wrote:
> Hi
> I have a simple question : I want to create a class that generates keyboard
> event to test my application.
> Ex : I want a method to send this :
> event.type == KEYDOWN and event.key == K_KP_PLUS:
>
> Any pointers to help me doing this ?
> Thanks
>
> --
> Pierre
>