You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
439 B
JavaScript
24 lines
439 B
JavaScript
6 years ago
|
const Simulator = require("./simulator.js");
|
||
|
const uinput = require("./uinput");
|
||
|
|
||
|
class KeyboardSimulator extends Simulator {
|
||
|
constructor() {
|
||
|
const event_names = Object.keys(uinput).filter(event_name =>
|
||
|
event_name.startsWith("KEY_")
|
||
|
);
|
||
|
console.log(event_names);
|
||
|
|
||
|
super(
|
||
|
{
|
||
|
name: "Custom device",
|
||
|
vendor: 0x1337,
|
||
|
product: 0x1010,
|
||
|
version: 1,
|
||
|
},
|
||
|
event_names
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = KeyboardSimulator;
|