Previous Thread
Next Thread
Print Thread
#109602 - 05/18/17 09:57 AM Mapping complex keyboards in MAME  
Joined: Mar 2015
Posts: 24
fulivi Offline
Member
fulivi  Offline
Member

Joined: Mar 2015
Posts: 24
Hi everyone,

I've a kind of "policy-related" question for you.
I've been working together with A.Kueckes on hp9845 driver. Now we'd like to rationalize the keyboard mapping because the current one is not very functional (and it doesn't support the German keyboard).
In our opinion the new mapping should allow key combinations for some of the original keys (e.g. SHIFT+ENTER for "STORE" key). The main reason for this is that the original system had 118 different keys!
It's currently impossible to pre-define input maps with key combinations (already tried that: it didn't work plus it was vetoed in this forum).
So now my idea would be to provide an auxiliary script to pre-load the key mapping in the configuration file or something with a similar effect.
The user would have the choice of either defining the "combination" keys manually through the UI or applying the script to do that work automatically.
So, here are a few questions on this point:
* Do you see a possible obstacle in the MAME input code to mass-defining combination keys? One thing MAME doesn't handle very well a.t.m. is two or more inputs whose activation keys are a subset of the others (e.g. one input mapped to ENTER, another to SHIFT+ENTER).
* Is the Lua console capable of assigning inputs to host keys? From my (limited) experiments it looks like it's not.
* Is an off-line Lua script capable of manipulating the XML cfg files? My understanding is that XML is not easily handled by Lua.
* A python script would surely do the work (and XML is easily read & written in py). But, of course, the user of this script would have to install the python runtime whereas Lua is already provided by MAME..
Thanks for your advice.
--F.Ulivi

#109603 - 05/18/17 10:40 AM Re: Mapping complex keyboards in MAME [Re: fulivi]  
Joined: Feb 2004
Posts: 1,802
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,802
Sydney, Australia
I don't think we're about to allow that for keyboard-like devices. Shift-Enter would be a bad mapping for Store, because both Shift and Enter are also mapped, meaning you'd make the mapping weird no matter what you did:

The naive Shift -> Shift, Enter -> Enter, Shift AND Enter -> Store produces the problem that pressing Shift+Enter produces Shift+Enter+Store.

Shift NOT Enter -> Shift, Enter NOT Shift -> Enter, Shift AND Enter -> Store makes it impossible to produce Shift+Enter or Shift+Store.

We have the same problem with the Sun keyboards that have up to 119 keys. MAME just doesn't provide default mappings for the L-function/Solaris group. The only real solution we have at the moment is clickable artwork to allow the user to click graphical representations of the extra keys with a pointing device.

#109606 - 05/19/17 04:50 PM Re: Mapping complex keyboards in MAME [Re: Vas Crabb]  
Joined: Mar 2013
Posts: 200
ICEknight Offline
Senior Member
ICEknight  Offline
Senior Member

Joined: Mar 2013
Posts: 200
Originally Posted by Vas Crabb
The only real solution we have at the moment is clickable artwork to allow the user to click graphical representations of the extra keys with a pointing device.
And if it could be output to its own screen, it would even be possible to use a paired touch screen as a virtual keyboard.

#109607 - 05/19/17 04:56 PM Re: Mapping complex keyboards in MAME [Re: ICEknight]  
Joined: Feb 2004
Posts: 1,802
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member

Joined: Feb 2004
Posts: 1,802
Sydney, Australia
Originally Posted by ICEknight
Originally Posted by Vas Crabb
The only real solution we have at the moment is clickable artwork to allow the user to click graphical representations of the extra keys with a pointing device.

And if it could be output to its own screen, it would even be possible to use a paired touch screen as a virtual keyboard.

You already can output artwork to a second screen. Make a custom .lay file with one view containing the screen and another containing artwork/controls, then use -numscreens, -view0 and -view1 to send the right thing to each screen.


Who's Online Now
3 registered members (Praxis, robcfg, Cpt. Pugwash), 19 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,389
Posts108,532
Members4,750
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.023s Queries: 14 (0.008s) Memory: 4.9489 MB (Peak: 5.1257 MB) Zlib enabled. Server Time: 2017-07-28 16:46:04 UTC