The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: buzz datt on April 29, 2002, 11:27:01 pm

Title: FE Developers: IPac Key Repeat?
Post by: buzz datt on April 29, 2002, 11:27:01 pm
Have been messing around with my own frontend and noticed something odd - when navigating with the keyboard,  holding down a key (ie, down arrow) will continuw scrolling down as long as the key is pressed.  When using my IPac, holding down the joystick only scrolls once.   I contacted Andy Warne about this, he said that this is expected behavior for the IPac (no typematic repeat unless you are using the USB version <sic>).

When I was using AdvanceMenu, the joystick caused the same behavior as the keyboard - the movement was repeated.

Any suggestions?  (Howard?)  Has anyone else encountered this, and what are some potential solutions?

Thanks in advance for your help!

Buzz
Title: Re: FE Developers: IPac Key Repeat?
Post by: Zipper on April 30, 2002, 05:34:17 am
I'm using MAME32, and had the same problem. I wanted to navigate through the games using the joysticks, but it would take forever to move through the roms.

My solution was to assign the second joystick up/down to pageup/pagedown using the Ipac programming util.
And then change the MAME default settings too so the change is reflected in the games too.

This way I can go up and down page at a time on MAME32 using joystick 2, and single rom at a time using joystick 1.

This isn't ideal, but I like it. I can find and launch games pretty quickly. I would be interested to see what other people think on this solution.
Title: Re: FE Developers: IPac Key Repeat?
Post by: ErikRuud on April 30, 2002, 08:09:33 am
It must depend on how the frontend expects to see then key input.

I use GameLauncher and it works well with the IPac and Joystick control.  

If your front end is looking for repeating keys, then it won't work with IPac.  If the FE is setup to look for a key being held down (one long keypress) then it will work with IPac.
Title: Re: FE Developers: IPac Key Repeat?
Post by: Lilwolf on April 30, 2002, 10:53:55 am
I spend a few hours adding this to my frontend a while ago.  Definately worth it.

But when I wrote the code... I went over to my keyboard to test it... then realized that the keyboard was handling repeats and removed the code... then went a realized that the encoders dont.... and readded it....

btw, it was probably around 2am when I did this.
Title: Re: FE Developers: IPac Key Repeat?
Post by: buzz datt on April 30, 2002, 11:00:49 am
All,

Thanks for the replies.  I was under the impression that the IPac sent out a discrete key down / key up when the switch made contact.  Are you saying that this is not the case? Should be pretty easy to handle if the key in question stays down for the duration - need to basically code my own key repeat.

Lilwolf, I've been there myself - my arcade cabinet is downstairs and my development PC is upstairs, so I get lots of exercise when I'm debugging!
Title: Re: FE Developers: IPac Key Repeat?
Post by: ErikRuud on April 30, 2002, 12:33:04 pm
It must be what is happening.  

Andy says that the IPac does not do repeats, and yet GameLauncher will continue to scroll if I hold the joystick up or down.  The key just stays down for the duration.
Title: Re: FE Developers: IPac Key Repeat?
Post by: VMJ Team on April 30, 2002, 01:27:50 pm
The repeating key feature is programmed into the front-end software.  I have also encorporated this feature into the KeyMouse software I wrote.  Not only can you program any keys to repeat, but you can also program shiftable keys or combination sets (example.  program ALT+F4 to be issued when you press a single key).

Check it out (Bug: will not work on some versions of WIN98/me)

http://www.cybertechdesign.net/software/keymouse/KeyMouse.zip

Title: Re: FE Developers: IPac Key Repeat?
Post by: Howard_Casto on April 30, 2002, 04:07:19 pm
Stick a timer in your front end your building have it activate when your holding down the key and send the code to scroll down every few milliseconds.  It works and it won't interfere with using a normal keyboard input.  
Title: Re: FE Developers: IPac Key Repeat?
Post by: buzz datt on April 30, 2002, 05:07:43 pm
Howard,

Thanks for the tip - that's exactly what I had in mind.  I'll try it out tonight and post results...

Buzz
Title: Re: FE Developers: IPac Key Repeat?
Post by: Dave Dribin on April 30, 2002, 09:38:51 pm
Yeah, like Howard said, you need to use timers.  Game Launcher does all the key repeat stuff itself with two timers, actually.  The first one is the time between the initial keypress and the first repeat.  The second timer is for subsequent repeats.  The first timer's default is 250ms and the second timer's is 125ms.  HTH!

-Dave
Title: Re: FE Developers: IPac Key Repeat?
Post by: buzz datt on May 01, 2002, 01:17:05 am
Made the changes tonight, worked on the first attempt.  Dave: Oddly enough, I implemented the repeat in the same way, with the same timer values that you suggested - before reading your message.  Too weird.

Thanks again for your tips!

Buzz