[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: separate key_press and key_release events
From: |
Marc Vaillant |
Subject: |
Re: separate key_press and key_release events |
Date: |
Sat, 26 Jul 2008 14:48:08 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Jul 25, 2008 at 01:59:13PM -0500, Da-Breegster wrote:
> My ASCII art ncurses game is proceeding with few bumps, but I've hit another
> problem. In
> SDL, a key event has an explicit type of being pressed or released. This
> allows for
> characters in games to move right (by holding right), jump (by tapping up),
> and continue
> moving right (because the right arrow key is still depressed). There seems to
> be no
> equivalent in ncurses; getch() returns a simple keypress. Pressing and
> holding a key fires
> repeated events correctly, but if the sequence is interrupted with a tap of
> the up key, no
> more right_arrow keys come in. The player has to release and repress the
> right key.
I've had the same issues when trying to prototype an app in ncurses that
makes heavy use of the mouse.
>
> 1) Is this caused by my terminal emulator (urxvt) or X? It seems to occur
> anywhere.
> 2) Is ncurses designed like this for a reason and is there a way to "correct"
> the above
> behavior?
>
> I know I could read off /dev/input and parse it and roll my own keyboard
> handling, but
> I'd prefer not to for this purpose.
You might try pdcurses, it might behave better.
>
> Thanks,
> ~Breeg
>
>
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-ncurses