Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Assigning multiple key combinations in Mala Controller Options?  (Read 4728 times)

0 Members and 1 Guest are viewing this topic.

play2dxtreme

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:April 21, 2010, 02:16:57 pm
Assigning multiple key combinations in Mala Controller Options?
« on: January 14, 2010, 12:48:53 pm »
Can more than one key input or a combination of key inputs be assigned to 'START' or 'EXIT' a game in Mala's contoller option menu?  This would reduce the chance of accidently exiting a game during play by accidently hitting a single button (when 'Exit' would require 2 keys pressed simultaneously).
« Last Edit: January 15, 2010, 11:13:41 am by play2dxtreme »

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #1 on: January 15, 2010, 09:10:09 pm »
You can assign a 'shift' key to achieve this

play2dxtreme

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:April 21, 2010, 02:16:57 pm
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #2 on: January 20, 2010, 09:28:09 am »
It seems as if that is the only way.  I appreciate your help.

loadman

  • Moderator
  • Trade Count: (+3)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4306
  • Last login:May 26, 2024, 05:14:32 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #3 on: January 21, 2010, 09:07:54 pm »
It seems as if that is the only way.  I appreciate your help.

The 'shift' key itself can be allocated too

mh12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:December 24, 2010, 10:03:57 am
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #4 on: January 22, 2010, 08:47:22 am »
i was wondering a similar thing...

is there any way to make 2 individual keys do the same thing? i was considering having both of my joysticks able to scroll the game lists (so up=arrow up OR y), but it doesn't seem possible.

play2dxtreme

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:April 21, 2010, 02:16:57 pm
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #5 on: January 25, 2010, 10:51:14 am »
MH12,
You are absolutely right, it would be a huge plus to give either the PLAYER 1 or PLAYER 2 side (in an arcade cabinet) the ability to navigate the MALA menu with their own buttons/keys.

Neverending Project

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 851
  • Last login:April 06, 2015, 10:07:43 pm
    • Arcade Fixer
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #6 on: January 25, 2010, 11:58:38 am »
is there any way to make 2 individual keys do the same thing? i was considering having both of my joysticks able to scroll the game lists (so up=arrow up OR y), but it doesn't seem possible.

Check out this thread for a setting up two joysticks to control the menu movement:
http://forum.arcadecontrols.com/index.php?topic=79752.0

mh12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:December 24, 2010, 10:03:57 am
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #7 on: January 25, 2010, 02:26:45 pm »
is there any way to make 2 individual keys do the same thing? i was considering having both of my joysticks able to scroll the game lists (so up=arrow up OR y), but it doesn't seem possible.

Check out this thread for a setting up two joysticks to control the menu movement:
http://forum.arcadecontrols.com/index.php?topic=79752.0

that's cool. i should've been clearer though: i said "keys" because i'm using a J-Pac. No way to assign to assign two different "keystrokes" to the same function, i guess. Not a big deal.

Neverending Project

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 851
  • Last login:April 06, 2015, 10:07:43 pm
    • Arcade Fixer
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #8 on: January 25, 2010, 04:23:41 pm »
Ah, I see. Two other options come to mind.

1) You could use the encode-on-the-fly feature of the JPAC. Make a default configuration where both joysticks are programed to send the same keystroke for up, down, left, right. Every time Mala launches a game it will load an emu-specific config with the correct joystick directions, and then will load this default when it returns to Mala.

2) Use something like AutoHotKey to remap one of the joysticks keys. Although I have never done it, I think you can have it only map the keys in Mala, and not in other programs.

play2dxtreme

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:April 21, 2010, 02:16:57 pm
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #9 on: January 25, 2010, 04:32:45 pm »
MH12,
It seems as you and I are looking for the same solution.  I am also using a J-Pac to encode the button and joystick inputs from my cabinet.  So, where Player #1 joystick uses the UP, DOWN, LEFT, and RIGHT keyboard keys to navigate; Player #2 joystick is set to use e.g. the D, R, G, & C keys for movement.  Therefore, if the UP & DOWN keys scrolls through the game list for player #1, we would want to be able to scroll through the game list with R & C keys for player #2.  I am only looking for this capability in the Mala Frontend Menu section where you scroll/navigate through the lists of emulators and games.

I see where Mala allows dual control in the 'JoyStick/GamePad' setup but, I don't see that ability under the 'Keyboard' setup.  Please correct me if I am wrong.

play2dxtreme

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:April 21, 2010, 02:16:57 pm
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #10 on: January 25, 2010, 04:39:45 pm »
Neverending Project,
I will see if the first option works.
Thank you.

mh12

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 125
  • Last login:December 24, 2010, 10:03:57 am
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #11 on: January 25, 2010, 09:26:02 pm »
i've been messing with Autohotkey lately. i wasn't aware you could make hotkeys program-specific. i should do that with some scripts i've written. and it would make doing this for MaLa simple.
cheers

Stormrider

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:September 28, 2014, 11:01:54 am
Re: Assigning multiple key combinations in Mala Controller Options?
« Reply #12 on: January 26, 2010, 03:27:32 pm »
That's easy. Look at these examples. The first one remaps a joy button to send esc, to bring up the quit dialogue. The second one, autocancels the quit dialogue after a while. Take a look at the Autohotkey help to find out the names of the keys. Also, use Autoit3 Window Spy (included with Autohotkey) to identify the current window. As you can see, in the first example, the hotkey only works while in the MaLa mainmenu. In the second example, the code only works while in the quit dialogue. Every window has a name that identifies it. Just place the mouse pointer over it and watch the spy window.

#IfWinActive MaLa ahk_class TfrmMain
~1joy9:: // mala start button
send, {Esc}
sleep 300

#IfWinActive ahk_class TfrmExit
SetTimer, idleexit, 8000
idleexit:
IfWinActive ahk_class TfrmExit
If (A_TimeIdle > 9000)
send, {Esc}
return