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 Version 1909 | AMD Ryzen 5 5600X | GIGABYTE AORUS GeForce GTX 1080 Ti | Crucial 16GB (2x8GB) DDR4 3600 RAM | Samsung 850 EVO 500 GB SSD | WD Red Plus 8TB

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

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
#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.
#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: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
#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 Version 1909 | AMD Ryzen 5 5600X | GIGABYTE AORUS GeForce GTX 1080 Ti | Crucial 16GB (2x8GB) DDR4 3600 RAM | Samsung 850 EVO 500 GB SSD | WD Red Plus 8TB

CPU Intensive Games
GPU Intensive Games
Games that don't need a strong CPU
#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: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
#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.
#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: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
#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
#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: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD




Users browsing this thread: 2 Guest(s)