|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
# You should have received a copy of the GNU Affero General Public License |
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. |
|
|
|
|
|
|
|
|
|
PROTOCOL_VERSION = '1' |
|
|
|
|
PROTOCOL_VERSION = '2' |
|
|
|
|
|
|
|
|
|
import evdev |
|
|
|
|
import json |
|
|
|
@ -30,7 +30,7 @@ for device_json in devices_json: |
|
|
|
|
capabilities = {} |
|
|
|
|
for k, v in device_json['capabilities'].items(): |
|
|
|
|
capabilities[int(k)] = [x if not isinstance(x, list) else (x[0], evdev.AbsInfo(**x[1])) for x in v] |
|
|
|
|
devices.append(evdev.UInput(capabilities, name=device_json['name'] + ' (via input-over-ssh)')) |
|
|
|
|
devices.append(evdev.UInput(capabilities, name=device_json['name'] + ' (via input-over-ssh)', vendor=device_json['vendor'], product=device_json['product'])) |
|
|
|
|
|
|
|
|
|
print('Device created') |
|
|
|
|
|
|
|
|
|