MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

joeisen
MAME dev newbie
Reged: 03/09/10
Posts: 7
Send PM
Sending Keys to MAME
03/14/10 02:26 AM


I’ve spent hours and hours on this and I can’t figure it out. Please help.

Here’s the scoop, a while back I made an onscreen game controller that I would use to control MAME. It’s a simple little windows form that simulates key presses to other applications.

Recently I decided to update my app to work with latest release of MAME and it just keeps failing. I noticed that Microsoft’s onscreen keyboard is also no longer working as an input device for MAME and I’m guessing it is failing for the same unknown reason… unknown to me that is.

My controller uses the Microsoft SendKeys() function to send key up and down messages. For grins I also tried using SendMessage() but I could see from the MAME source code (window.c) that it wasn’t going to work either as the MAME window is not processing WM_KEYDOWN messages.

I received a little glimmer of hope from an article that explained that when you use SendInput() with apps that are using DirectInput, you have to use the scan codes for DirectInput instead of virtual keys. That sounded to me like the silver bullet because I can see that the latest version of MAME is indeed using DirectInput. But alas… after hours of trying different implementations of this I could not get SendInput() to send keyboard input to MAME.

If anyone has any ideas on how to send keys to MAME please let me know. I’m desperate and almost ready to give up on this little endeavor.







Entire thread
Subject Posted by Posted on
* Sending Keys to MAME joeisen 03/14/10 02:26 AM
. * Re: Sending Keys to MAME MetalGod  09/08/19 03:33 AM
. * Re: Sending Keys to MAME headkaze  02/07/11 11:10 PM
. * Re: Sending Keys to MAME Dr_Lagaffe  09/06/11 09:58 AM
. * Re: Sending Keys to MAME tapley  08/31/19 01:54 PM
. * Re: Sending Keys to MAME Camame  08/14/23 03:05 AM
. * Accessibility Issues for Disabled Gamers SpecialEffect  10/03/11 02:01 PM
. * Re: Accessibility Issues for Disabled Gamers R. Belmont  10/03/11 04:27 PM
. * Re: Accessibility Issues for Disabled Gamers SpecialEffect  10/17/11 11:04 AM
. * Re: Sending Keys to MAME Counter Force  06/26/10 04:08 AM
. * Re: Sending Keys to MAME HowardC  03/25/10 10:49 PM
. * Re: Sending Keys to MAME Thad  07/10/11 04:02 AM
. * Re: Sending Keys to MAME joeisen  03/26/10 01:55 AM
. * Re: Sending Keys to MAME Lord Nightmare  06/28/10 09:20 AM
. * Re: Sending Keys to MAME R. Belmont  03/14/10 09:55 PM
. * Re: Sending Keys to MAME joeisen  03/15/10 06:43 PM
. * Re: Sending Keys to MAME Vas Crabb  03/14/10 10:52 PM
. * Re: Sending Keys to MAME R. Belmont  03/15/10 03:48 PM
. * Re: Sending Keys to MAME Vas Crabb  03/15/10 10:53 PM
. * Re: Sending Keys to MAME joeisen  03/15/10 11:21 PM
. * Re: Sending Keys to MAME joeisen  03/15/10 02:06 AM
. * Re: Sending Keys to MAME Vas Crabb  03/15/10 05:48 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 16 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 18081