A closer to the metal library for Xbox controller to keyboard and mouse input.
XMapLibSharp is a C# .NET GUI project using the C++ project code through a DLL. With this approach, the project has access to the entire .NET framework for GUI work while keeping the native performance and power of the C++ XMapLib project code.
The project utilizes
- .NET multi-threading
- events
- programmatic UI element creation
- a producer/consumer design pattern.
- managed/native interop via custom C++ DLL
A high level code diagram of the XMapLib project code (native C++)
The project utilizes
- C++ templates
- Template SFINAE
- constexpr
- unit testing with Microsoft CppUnitTestingFramework
- multi-threading, many threads running concurrently and interacting
- concurrency synchronization objects, like mutexes and RAII scoped locks
- C++ standard atomics
- lambdas, and passing lambdas as arguments
- usage of several Windows API functions including the XInput lib
- operator overloads
- input simulation
- C++ pointer wrappers like unique_ptr
- if-constexpr to do compile-time decisions instead of run-time
- STL containers and algorithms
- it is a real time system (or very close)
- lots and lots of object oriented programming
The main classes for use in the native C++ XMapLib project are :
- MouseMapper
- KeyboardMapper
- MousePlayerInfo
- KeyboardPlayerInfo
- To set the mapping details KeyboardKeyMap encapsulates the information comprising a controller key to keyboard/mouse key mapping.
Also, please see the Example
The DLL API exposed from XMapLibDLL is described totally in apifuncs.h in the DLL project.


