Page 1 of 1

List of key codes?

Posted: Tue Apr 01, 2025 6:41 am
by dmark468
I've been scouring the Web and the source code and I can't find any information on how to do "[" or ";" keys (KEYCODE_OPENBRACE and KEYCODE_COLON respectively in MAME).

I did find one post that said to try this:

KEY_LEFTPAREN

Of course, that's the only instance of that text on the entire Web. :)

So this stuff has got to be documented somewhere. Looking at the source, I wonder if KEY_; or KEY_[ will work. Will try, but I don't like guessing (want the official word on what is supported). The above-mentioned post is here:

https://forums.launchbox-app.com/topic/ ... key-codes/

Thanks in advance!

EDIT: I used the configuration command line utility and it turns out the post was right. The other is KEY_SEMICOLON.

EDIT: Aha, removing "Supermodel" from the search query brought up a few more results, including the SDL reference:

https://ocamlsdl.sourceforge.net/doc/html/Sdlkey.html

Re: List of key codes?

Posted: Wed Apr 02, 2025 2:22 am
by Bart
You can find them in the source code here. Also, the intended way to configure these is to use the -config-input option, not by editing the INI file manually. This can be done globally or on a per-game basis.

Re: List of key codes?

Posted: Thu Apr 03, 2025 7:05 am
by dmark468
Bart wrote: Wed Apr 02, 2025 2:22 am You can find them in the source code here. Also, the intended way to configure these is to use the -config-input option, not by editing the INI file manually. This can be done globally or on a per-game basis.
Thanks! I generate the INI based on the hardware configuration.

And speaking of remapping keys, it would be wonderful if we could remap pause (e.g. to P). Same for save and load states. Just in the INI? For example, I always have Pause as P on my control panels, which is the default for some emulators and configurable for others.

But Sega Model 3 is always a special case, requiring a keyboard. Surely a lot of installations live in cabinets, so this would seem like a useful feature. I imagine that a lot of users are simply unable to pause games on this platform, so that feature goes unused.

Thanks again for all of the help! Will post back with regression test results for that white flashing issue in the new build. My test PC is pretty lame by design (e.g. no graphics card), but it runs the version from a year ago just fine. Something changed at some point in the last year. Not using the new 3-D engine; IIRC, it was too much effort for the test PC. So did something change with the old engine?

Re: List of key codes?

Posted: Fri Apr 04, 2025 4:11 am
by Bart
There is no white flashing issue. It is intentional. This is how the original hardware behaves and it was very recently emulated.

Re: List of key codes?

Posted: Tue Apr 15, 2025 12:01 am
by dmark468
Bart wrote: Fri Apr 04, 2025 4:11 am There is no white flashing issue. It is intentional. This is how the original hardware behaves and it was very recently emulated.
I can't imagine that what I was seeing was anything intentional. It went from basically perfect to perfectly unusable. It wasn't just a few flashes at the start. As mentioned, my test PC uses integrated graphics and is old, but worked perfectly well with the version from a year ago.

Will do a regression test to see what version started it... Thanks!

Re: List of key codes?

Posted: Mon Apr 21, 2025 4:08 am
by Bart
If the -no-white-flash option fixes it, then the white flashes are correct.