...
Code Block |
---|
java -cp .:KeyboardingMaster.jar:lib/input/jinput.jar -Djava.library.path=lib/native com.monkygames.kbmaster.util.ScanHardware "Razer Marauder Razer Marauder" >& map.txt |
Next, press all of the buttons on the device individually. Once done, ctrl-c in the terminal.
At this point, you have all of the information necessary to develop a driver. If you are assistening with the development, please pass on the HardwareScan.log and the map.txt file to the developer. Note, if you don't want to provide the HardwareScan.log, then just note the Controller.getName as that is all that is really needed from the HardwareScan.log. You will need to provide the map.txt though.
Programming
This section describes the required steps for adding a new device in the code.
Package
Create a new package in the com.monkygames.kbmaster.driver for the brand if it doesn't already exist. For instance, if Razer is the manufacturer, then the com.monkygames.kbmaster.driver.razer package should already exist. If not, create it.
Next create a package specific for the device. For instance if the device name is Razer Orbweaver Chroma, then create the following package: com.monkygames.kbmaster.driver.razer.orbweaverchroma.
Device
The code for adding the new device should be a subclass of Device. The new file should be in the new package directory.
Note |
---|
todo |
JavaFX File
The new device should also have a JavaFX file in the same package directory.
Note |
---|
todo |
PackageInfo
The package directory should also have a package-info.java file for javadocs.
DriverManager
Update the com.monkygames.com.kbmaster.driver.DriverManager class to add the new device. If its a Razer device, add it to the createRazerDriver method. If its a new make, then create a new method for that make. Follow the createRazerDriver method for a template.