littlemahi / mame4all-pi

Automatically exported from code.google.com/p/mame4all-pi
0 stars 0 forks source link

Improved Alt Key Recognition #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Go into the input settings for "general" or the currently playing ROM.
2.  Select an input to re-assign the keystroke.
3.  (Be using a USB HID keyboard)
4.  Press either the left Alt key or the right Alt key.

What is the expected output? What do you see instead?
I expect to see LAlt or RAlt being assigned to the input, depending on which 
Alt key I pressed, similarly to seeing LCtrl/RCtrl or LShift/RShift.  However, 
I only see "Alt".  Upon further testing, MAME does not seem to be able to tell 
the difference between the right Alt and left Alt.

What version of the product are you using? On what operating system?
This is on Raspberry Pi.  I don't recall the version, but I installed MAME4all 
from the store site no more than a 1 or 2 months ago.

Please provide any additional information below.
Additional info in case it helps...  a USB keyboard can only report 6 
simultaneous key presses at a time, unless the "modifier" byte is used in the 
report to indicate left/right ctrl/alt/shift/gui keys.  I am making a 
two-player cabinet with an Arduino that mimics a USB keyboard.  By MAME not 
telling the difference between left/right Alt, I have one less simultaneous key 
stroke that I can depend on mapping to one of the controls.

On a side note, I have not yet checked to see if MAME recognizes left/right gui 
keys yet.

Thanks and keep up the great work!

Original issue reported on code.google.com by brane99...@gmail.com on 23 Aug 2013 at 7:00

GoogleCodeExporter commented 8 years ago
Yes, this just the way this version of MAME engine works.

Original comment by squid...@gmail.com on 24 Aug 2013 at 1:55

GoogleCodeExporter commented 8 years ago
I looked at src/rpi/input.cpp.  It has these lines in a table:

    { "ALT",        KEY_ALT,            KEYCODE_LALT },
    { "ALTGR",      KEY_ALTGR,          KEYCODE_RALT },

It looks like there should be some support for both left and right Alt keys.  
But sadly, no matter which Alt key I hit, it shows up as "ALT" and never 
"ALTGR".  I might later take a closer look and let you know if I see an easy 
fix.  Thanks!

Original comment by brane99...@gmail.com on 1 Sep 2013 at 4:40

GoogleCodeExporter commented 8 years ago
Yes but it doesn't appear to be recognised in SDL input which is the interface 
I use. I don't thinnk there's a solution to this.

Original comment by squid...@gmail.com on 2 Sep 2013 at 3:11

GoogleCodeExporter commented 8 years ago
Not fixable with SDL.

Original comment by squid...@gmail.com on 10 Oct 2013 at 3:07