• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Q] Keyboard repeats stop when I hit another key. How do I get them back?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Keyboard repeats stop when I hit another key. How do I get them back?


  • Subject: Re: [Q] Keyboard repeats stop when I hit another key. How do I get them back?
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 5 Nov 2001 14:23:18 -0800

On Monday, November 5, 2001, at 01:58 PM, Alexandre Aybes wrote:

my current problem is that when I get the key repeats (for example the user holds the up arrow) I move correctly, but as soon as I hit another key (let's say space to jump/fire/whatever) the arrow key repeats stop, and therefore my character doesn't move anymore :-/


Well, the repeat will always be of the *last* key to go down. What you'll probably need to do is sign up for keydown and keyup events, and keep track yourself of what keys are down.

Some of Apple's keyboards have what's known as "2-key rollover", and to do what you want, you may need a keyboard with "N-Key rollover."

To find out whether your keyboard has 2-key or N-key rollover, open the "Key Caps" application, and see what it indicates when you hold down three or more keys. When you hit the limit, additional keys pressed won't show up. My NeXT keyboard apparently has five-key rollover.

Pity, because one thing I've had in mind to do for a *long* time, is write an app that maps musical notes to the letter keys. (Sort of a button-accordian style instrument.)

-jcr

"The Digital Millenium Copyright Act is the latest legislative proof of the Peter Principle."


References: 
 >[Q] Keyboard repeats stop when I hit another key. How do I get them back? (From: Alexandre Aybes <email@hidden>)

  • Prev by Date: Re: NSImage initialization question
  • Next by Date: Weird SIGBUS errors
  • Previous by thread: [Q] Keyboard repeats stop when I hit another key. How do I get them back?
  • Next by thread: Re: [Q] Keyboard repeats stop when I hit another key. How do I get them back?
  • Index(es):
    • Date
    • Thread