Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BetterJoyForCemu/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,9 @@
<!-- Have ShowAsXInput as false if using this -->
<!-- Default: false -->
<add key="ShowAsDS4" value="true"/>

<!-- Overrides capture button key mapped with Windows Screenshot shortcut Win + PrtScrn -->
<!-- Default: false -->
<add key="WindowsScreenshot" value="false"/>
</appSettings>
</configuration>
7 changes: 6 additions & 1 deletion BetterJoyForCemu/Joycon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ public byte[] GetData() {

bool showAsXInput = Boolean.Parse(ConfigurationManager.AppSettings["ShowAsXInput"]);
bool showAsDS4 = Boolean.Parse(ConfigurationManager.AppSettings["ShowAsDS4"]);
bool windowsScreenshot = Boolean.Parse(ConfigurationManager.AppSettings["WindowsScreenshot"]);

public MainForm form;

Expand Down Expand Up @@ -540,7 +541,11 @@ private void Simulate(string s, bool click=true, bool up=false) {
if (s.StartsWith("key_")) {
WindowsInput.Events.KeyCode key = (WindowsInput.Events.KeyCode)Int32.Parse(s.Substring(4));
if (click) {
WindowsInput.Simulate.Events().Click(key).Invoke();
if (s == Config.Value("capture") && windowsScreenshot) {
WindowsInput.Simulate.Events().ClickChord(WindowsInput.Events.KeyCode.LWin, WindowsInput.Events.KeyCode.PrintScreen).Invoke();
} else {
WindowsInput.Simulate.Events().Click(key).Invoke();
}
} else {
if (up) {
WindowsInput.Simulate.Events().Release(key).Invoke();
Expand Down