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

[Enhancement] Add ability to map key chords rather than just individual keys #303

Open
xyzwilliamxyz opened this issue Apr 19, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@xyzwilliamxyz
Copy link

xyzwilliamxyz commented Apr 19, 2020

Hi!

I would like to be able to take a screenshot pressing the capture button. Even though we have the the mapping key feature, Windows only allows to map 2+ keys for such a thing (ugh).

There could be 2 possible solutions this: to allow the mapping feature support 2+ keys OR a configuration option that overrides the capture button with windows screenshot shortcut.

For the sake of simplicity I think the second option is better, since I think there aren't many uses for multiple buttons being mapped.

@xyzwilliamxyz xyzwilliamxyz changed the title Take screenshot globally from any game or emulator [Enhacement] Take screenshot globally from any game or emulator Apr 19, 2020
@xyzwilliamxyz xyzwilliamxyz changed the title [Enhacement] Take screenshot globally from any game or emulator [Enhancement] Take screenshot globally from any game or emulator Apr 19, 2020
@Davidobot
Copy link
Owner

Seems a bit specific as well. I'd rather avoid having yet more flags. Too many niche booleans.

@Davidobot Davidobot reopened this Apr 20, 2020
@Davidobot
Copy link
Owner

I'll implement this as the ability to map key chords instead of single keys.

@Davidobot Davidobot added the enhancement New feature or request label May 19, 2020
@Davidobot Davidobot changed the title [Enhancement] Take screenshot globally from any game or emulator [Enhancement] Add ability to map key chords rather than just individual keys May 19, 2020
@Grntrenchman
Copy link

Grntrenchman commented Oct 26, 2020

I wish there was a way I could help this along, it's all that's missing for me personally to take this project from 100% awesome to 110%. I wanted to play EtG on PC coming from switch, and only had Joy-Cons around. This is the only setup that was low enough latency to play well. I want to put AMD capture combo on capture button. I can help flesh out the meta logic for sure, but I'm not familiar with the code. (I'm a script kiddie pretty much, bash/bat only)

You'd need in reassign, to change the keydown trigger into a loop sticking any detected keys into an array, then writing out the array to config on first keyup.

Then in joycon, changing the single keypress logic to a loop to iterate keydown through the array also, and keyup it all at the end of array.

I might try to figure out how to build this, and then try to poke at it some myself, isn't really a heavy change, I just don't know any of the syntax. (array, loop, VS in general)

edit: this is what I mean about inexperience.. I see now it would also need updating get/asyncprettyname to handle array instead of single item, possibly effects elsewhere also. Medium-heavy change, can see why it hasn't "just been done"

@Davidobot
Copy link
Owner

@Grntrenchman I believe WindowsInput, the library I use for button/mouse capture and replay has chord support. At least for executing the chords.

@Grntrenchman
Copy link

Grntrenchman commented Oct 26, 2020

Thank you for replying! I saw that while digging more into it. You'd still probably be better off just looping through an array of keys. Then you won't have to do logic on if the input is/isn't a combo, and routing to different commands. If you loop, it covers 1 or a combo with same code.

fleshing out the loops more:
In Reassign, init array, wait for keydown that isn't in the array (or keyup), add to array, finish array on any keyup.

I don't understand the prettyname calls, so I have no advice there unfortunately.

Edit: managed to hack it in by hardcoding the combo.. looking into hooking hold-capture to do this instead, press do screenshot instead.

@TheCatin
Copy link

Edit: managed to hack it in by hardcoding the combo.. looking into hooking hold-capture to do this instead, press do screenshot instead.

How did you manage to do this? I'm trying to do Ctrl+Shift+S, but nothing I've tried seemed to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants