Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to map gamepad buttons to hotkeys. #1949

Merged
merged 1 commit into from Feb 4, 2015

Conversation

skidau
Copy link
Contributor

@skidau skidau commented Jan 23, 2015

To set up a mix of keyboard and gamepad shortcuts, follow these steps:

  1. In the main hotkey config, change the Device to Keyboard
  2. Right click the hotkey button that you wish to map to your gamepad
  3. In the window that pops up, change the Device to your gamepad
  4. Press the Clear button
  5. Press Detect and press the button on your gamepad that you want to map
  6. Press Select
  7. Press OK

To map a combo hotkey, e.g. Shift F5, follow these steps

  1. Follow steps 1-4 above
  2. Press Detect and the modifier button (e.g. Shift)
  3. Press Select
  4. Press Detect and the button which isn't the modifier (e.g. F5)
  5. Press the "& AND" button
  6. Press OK

@skidau skidau force-pushed the hotkey-input branch 2 times, most recently from 6dd67e2 to e7d6ad7 Compare January 23, 2015 11:20
@Kodiack
Copy link

Kodiack commented Jan 23, 2015

It looks like binding things to controller work properly after preliminary testing, although it also appears that KB/mouse and gamepad binds are unable to be utilised simultaneously. For example, if I set the frame unlimiter to something on a controller, it will work, although I will then be unable to use basic keyboard shortcuts like alt+enter or escape. The binds only work on the "active" input device. I'm unsure if this is an inherent limitation or not.

Regardless, it's great to see some progress on this front, so kudos for that, skidau!

@skidau
Copy link
Contributor Author

skidau commented Jan 23, 2015

That is a feature of Dolphin's controller interface. To set up a mix of keyboard and gamepad shortcuts, follow the steps in the description.

@Kodiack
Copy link

Kodiack commented Jan 23, 2015

That seems to work okay for simultaneous binding! I'm running into an issue when binding stuff where it will frequently run into a syntax error, though, at which point it will not allow me to apply the bindings and I need to clear them to even close the window. I'll test a bit and see if I can find some consistency in that behaviour.

EDIT: Ah, I see what was going on. It was a good ol' PEBKAC error. The menu just uses some basic logic commands, and I think I accidentally hit "| OR" to start a string instead of "Select". Once I understood how the control method actually worked, it seems to be just fine.

@skidau skidau force-pushed the hotkey-input branch 2 times, most recently from e55f8cb to 90a3e0f Compare January 23, 2015 12:19

InputConfigDialog m_ConfigFrame(this, *hotkey_plugin, _("Dolphin Hotkeys"), 0);
m_ConfigFrame.ShowModal();
m_ConfigFrame.Destroy();

This comment was marked as off-topic.

@skidau skidau force-pushed the hotkey-input branch 3 times, most recently from 0b8a113 to 265e67e Compare January 23, 2015 13:10
@skidau
Copy link
Contributor Author

skidau commented Jan 23, 2015

This should fix Issues 2986 and 7652.

@skidau skidau force-pushed the hotkey-input branch 2 times, most recently from bda2cdb to 1bbbc9a Compare January 26, 2015 01:02
@CarlKenner
Copy link
Contributor

Cegli already implemented something like this in the Dolphin VR fork.

@skidau skidau force-pushed the hotkey-input branch 2 times, most recently from 2ab4c5c to ceee0a9 Compare January 26, 2015 09:50
@lioncash
Copy link
Member

ok

@skidau
Copy link
Contributor Author

skidau commented Jan 27, 2015

@dolphin-emu-bot rebuild

2 similar comments
@Parlane
Copy link
Member

Parlane commented Jan 27, 2015

@dolphin-emu-bot rebuild

@Parlane
Copy link
Member

Parlane commented Jan 27, 2015

@dolphin-emu-bot rebuild

skidau added a commit that referenced this pull request Feb 4, 2015
Added the ability to map gamepad buttons to hotkeys.
@skidau skidau merged commit 5e64573 into dolphin-emu:master Feb 4, 2015
@ROMaster2
Copy link

Bad news. It seems the controller configs crash the whole program when you try to open them. 5400 doesn't crash but 5402 does crash as a result of this pull. Hopefully this can be resolved.

@skidau
Copy link
Contributor Author

skidau commented Feb 4, 2015

@ROMaster2 what operating system are you using?

@ROMaster2
Copy link

Yeah I probably should have mentioned that. Windows 7 Ultimate 64-bit SP1

I can record something really quickly with OBS if needed.

@skidau
Copy link
Contributor Author

skidau commented Feb 4, 2015

@ROMaster2 not sure how I missed that bug. I have created a fix for it in #2010 if you could test it for me?

@ROMaster2
Copy link

Oops, sorry for the delay. Yeah it still crashes

Here's a video which I'll delete shortly: https://www.dropbox.com/s/3j3v0kdzrt846pm/stream_temp.mp4?dl=0

@skidau
Copy link
Contributor Author

skidau commented Feb 4, 2015

@ROMaster2, thanks - I have update the build to fix the crash on the Wiimote configuration too. Let me know if you spot any other bugs.

OnConnectWiimote(evt);
}

if (g_Config.bFreeLook)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@cegli2
Copy link

cegli2 commented Feb 6, 2015

@skidau Doing a little more testing, I'm having problems with getting the free look to work consistently. I've tried two separate computers, and tried deleting my old .ini files. It seems like it only detects about 5% of my button presses or something. The other hotkeys seem to be working, so I'm not sure what the deal is. Let me know if you see the same behavior, or if it's only me. Looking in the debugger it looks like it's constantly going through "HotkeyManagerEmu::IsPressed" as well, even when I'm not hitting any buttons? Other hotkeys (save states, frame limiter, etc) seem to be working well.

@psennermann
Copy link

On my system this merge caused a general game speed slowdown of about 4%...

@Kodiack
Copy link

Kodiack commented Feb 8, 2015

There seems to be another possible regression here: When Escape is used as the hotkey to exit a game, it will do just that even when you mean for it to close a menu. For example, set escape as this hotkey if it's not already, open a game, and then open a menu (like the graphics menu). Then, try to close the menu with escape. The menu will close, but so will the game unless "Confirm on Stop" behaviour is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants