USE
Using the script is complicated to explain but simple in practice. The idea behind the script is a dynamic keyboard layer based on the active application. This can be broken down into two parts.
The first is the idea of a keyboard layer. "Layer refers to a set of additional key bindings achieved by holding down a modifier key on the keyboard." (deskthority). The most basic example of this is the shift key. Normally all the letters are mapped to their lowercase variants, but when the shift key is held the "uppercase layer" is activated and KEYS BECOME MAPPED TO UPPERCASE LETTERS. The mouse script works the same way, when the toggle key is held the keys to toggle (as specified in config) get mapped to a dynamic layer.
This layer is dynamic because it changes based on the active application. If you're using Chrome "6" might be mapped to change tabs on this layer. If you're using VSCode instead "6" might be mapped to the hotkey for selecting the current line. This is completely customizable using the configuration utility. In the example above you can see 6 mapped to camera controls in CAD then mapped to change tabs in firefox.
Configuration
The configuration of the script is handled in a septate script called "Hotkey Setter.exe". This script has a GUI that allows a user to set up custom hotkeys for applications of their choice.
The window Title box is what allows the user to specify the application they want the background layer to be used on. The file name option allows users to specify the name of the file that this configuration should be saved in. Each number corresponds to a physical button on the input device in my case a mouse. The top box specifies the action to take when a key is pressed down, while the bottom box specifies the action to take when the key is released.
The config checkbox in the top left lets the user specify what keys to toggle on. The toggle key can be specified here in a box labeled toggle key. In this mode the top box lets you specify the key to toggle on and the bottom box defines what that key is mapped to by default. This allows the script to be versatile and work with any buttons the user wants.