Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using gamepad buttons as hotkeys
#1
Does anyone know how to do this in PCSX2_keys.ini? Apparently it's possible, check out rama's last comment towards the bottom:
https://code.google.com/p/pcsx2/source/detail?r=4917
[Image: pNm13X9.gif]
Windows 10 Pro x64 | Intel Core i7-4790K @ 4.00 GHz | PowerColor R9 290X 4GB | G.SKILL 16GB (4x4GB) DDR3 1600 RAM | Samsung 850 EVO 250 GB SSD | Seagate ST3000DM001 3TB HDD

CPU Intensive Games
GPU Intensive Games
Games that don't need a strong CPU
Reply

Sponsored links

#2
do you mean on how to set custom mappings for the function shortcuts ? it's easy, do it like the format below on pcsx2_keys.ini.

// the following function maps fullscreen toggle and snapshot shortcut to the following keys.

Code:
FullscreenToggle = HOME
Sys_TakeSnapshot = END
We're supposed to be working as a team, if we aren't helping and suggesting things to each other, we aren't working as a team.
- Refraction

[Image: 84t1dRu.png]
Reply
#3
Config, Controller, Plugin Settings. Go to pad one. Here is an example for mapping key bindings to PCSX2. Program R3 as right stick. Then program R3 as tab. That would give your right stick programmed to R3 and when you press it, it would also program it as TAB when you press it, which would do Turbo without actually having to press TAB. I assume that's what you're wanting, if not, my bad.
Reply
#4
Nope, neither of you understood what he wants Tongue2

He wants to directly bind the joystick in PCSX2_keys.ini

Like:

Code:
FullscreenToggle = J1_B1

(note that's made up, it doesn't work)

which the commit comment suggests is possible, but IDK.
[Image: vwah44]
Gaming: Intel i7 3770k @ 4.2Ghz | R9 290 | 16GB RAM | 480GB(240GB+240GB RAID0) SSD | 3 TB HDD | 1 TB HDD | 500GB HDD
Server: AMD FX 6300 @ 4.4Ghz | GTX 670 | 16GB RAM | 240GB SSD | 320GB HDD
PCSX2 General Troubleshooting FAQ
Reply
#5
Yeah what I want to do is what Blyss Sarania just said. I want to map PCSX2's functions to gamepad buttons instead of keyboard keys. Sukunda's workaround seems doable though, if not a bit convoluted.
[Image: pNm13X9.gif]
Windows 10 Pro x64 | Intel Core i7-4790K @ 4.00 GHz | PowerColor R9 290X 4GB | G.SKILL 16GB (4x4GB) DDR3 1600 RAM | Samsung 850 EVO 250 GB SSD | Seagate ST3000DM001 3TB HDD

CPU Intensive Games
GPU Intensive Games
Games that don't need a strong CPU
Reply
#6
I just use JoyToKey personally.

Although now that I've more experience reworking the UI I intend to attempt the Lilypad stuff we talked about a while back to let you cross map anything as you like.
[Image: vwah44]
Gaming: Intel i7 3770k @ 4.2Ghz | R9 290 | 16GB RAM | 480GB(240GB+240GB RAID0) SSD | 3 TB HDD | 1 TB HDD | 500GB HDD
Server: AMD FX 6300 @ 4.4Ghz | GTX 670 | 16GB RAM | 240GB SSD | 320GB HDD
PCSX2 General Troubleshooting FAQ
Reply
#7
Yeah, I kinda figured they wanted something more like that but I wasn't able to find anything about being able to do that. Unfortunately it doesn't allow multimapping (from what I know) for a button such as Alt+Enter to make them both work at the same time to make something like Fullscreen work from one button.
Reply
#8
Well, when I get what I'm doing done you will be able to map any key on your controller to hotkeys in PCSX2 directly.

See the discussion about that here https://github.com/PCSX2/pcsx2/pull/461

Originally I was just adding more hack options to lilypad, but we decided integrating joytokey like feature would be badass.
[Image: vwah44]
Gaming: Intel i7 3770k @ 4.2Ghz | R9 290 | 16GB RAM | 480GB(240GB+240GB RAID0) SSD | 3 TB HDD | 1 TB HDD | 500GB HDD
Server: AMD FX 6300 @ 4.4Ghz | GTX 670 | 16GB RAM | 240GB SSD | 320GB HDD
PCSX2 General Troubleshooting FAQ
Reply
#9
Code:
if (config.saveStateHack == 1){ // send F1 to the emulator
    if (b->command == 0x12){ // R3 button
        static unsigned int LastCheckR3 = 0;
        unsigned int t = timeGetTime();
        if (t - LastCheckR3 < 300) return;
        QueueKeyEvent(VK_F1, KEYPRESS);
            LastCheckR3 = t;        }
that just maps the F1 key to the R3 button. it would be better to make such things user customizable which is the whole process of K2J. how do you plan on integrating it with pcsx2 ?
We're supposed to be working as a team, if we aren't helping and suggesting things to each other, we aren't working as a team.
- Refraction

[Image: 84t1dRu.png]
Reply
#10
(04-13-2015, 08:04 AM)ssakash Wrote:
Code:
if (config.saveStateHack == 1){ // send F1 to the emulator
    if (b->command == 0x12){ // R3 button
        static unsigned int LastCheckR3 = 0;
        unsigned int t = timeGetTime();
        if (t - LastCheckR3 < 300) return;
        QueueKeyEvent(VK_F1, KEYPRESS);
            LastCheckR3 = t;        }
that just maps the F1 key to the R3 button. it would be better to make such things user customizable which is the whole process of K2J. how do you plan on integrating it with pcsx2 ?

Yes that's why we closed that PR because we planned to do it the new way. I only linked it for the discussion.

Basically I will be making a new tab in the Lilypad config which will contain a similar type of mapping area to the Pad 1/2 area except it will be for mapping hotkeys -> controller.

So like now where you have Triangle/square/circle/cross and all the other buttons on the new hotkeys tab you will have buttons for turbo, save state, load state, and all the other hotkeys.

The binding process will be the same. You will click the button you want to bind to and then the controller button you want it to be. So you might click the "load state" button in the UI and then press Select on your controller to map load state to select.
[Image: vwah44]
Gaming: Intel i7 3770k @ 4.2Ghz | R9 290 | 16GB RAM | 480GB(240GB+240GB RAID0) SSD | 3 TB HDD | 1 TB HDD | 500GB HDD
Server: AMD FX 6300 @ 4.4Ghz | GTX 670 | 16GB RAM | 240GB SSD | 320GB HDD
PCSX2 General Troubleshooting FAQ
Reply




Users browsing this thread: 1 Guest(s)