-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue caused by threaded calls from PowerManager (#486)
* rollback PowerManager modifications Threaded call from raised event was affecting Keyboard hook * implement Default Device F1-F4 OEM key support helpful for debugging...
- Loading branch information
Showing
2 changed files
with
32 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,36 @@ | ||
namespace ControllerCommon.Devices | ||
using ControllerCommon.Inputs; | ||
using System.Collections.Generic; | ||
using WindowsInput.Events; | ||
|
||
namespace ControllerCommon.Devices | ||
{ | ||
public class DefaultDevice : IDevice | ||
{ | ||
public DefaultDevice() : base() | ||
{ | ||
OEMChords.Add(new DeviceChord("F1", | ||
new List<KeyCode>() { KeyCode.F1 }, | ||
new List<KeyCode>() { KeyCode.F1 }, | ||
false, ButtonFlags.OEM1 | ||
)); | ||
|
||
OEMChords.Add(new DeviceChord("F2", | ||
new List<KeyCode>() { KeyCode.F2 }, | ||
new List<KeyCode>() { KeyCode.F2 }, | ||
false, ButtonFlags.OEM2 | ||
)); | ||
|
||
OEMChords.Add(new DeviceChord("F3", | ||
new List<KeyCode>() { KeyCode.F3 }, | ||
new List<KeyCode>() { KeyCode.F3 }, | ||
false, ButtonFlags.OEM3 | ||
)); | ||
|
||
OEMChords.Add(new DeviceChord("F4", | ||
new List<KeyCode>() { KeyCode.F4 }, | ||
new List<KeyCode>() { KeyCode.F4 }, | ||
false, ButtonFlags.OEM4 | ||
)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters