mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
More tweaks to makey node - colours, jshint fixes, icons, readme etc.
This commit is contained in:
parent
9d6d9917b8
commit
232a11983b
@ -16,7 +16,7 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="makeymakey">
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
</script>
|
||||
@ -33,7 +33,7 @@
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('makeymakey',{
|
||||
category: 'advanced-input',
|
||||
color:"#6da082",
|
||||
color:"#f6e686",
|
||||
defaults: {
|
||||
name: {value:""},
|
||||
vid: {value:"0x1b4f",required:true},
|
||||
|
@ -22,7 +22,6 @@ function MakeyNode(n) {
|
||||
this.vid = 0x1b4f; // MakeyMakey vendor ID
|
||||
this.pid = 0x2b75; // MakeyMakey product ID
|
||||
var node = this;
|
||||
//node.log("Want:"+node.vid.toString(16)+":"+node.pid.toString(16));
|
||||
var path = null;
|
||||
var tout;
|
||||
var click = false;
|
||||
@ -65,13 +64,12 @@ function MakeyNode(n) {
|
||||
else if (key.modKeys[0] === "ctrl") {
|
||||
if (key.charCodes.length === 0) {
|
||||
click = !click;
|
||||
(click) ? (msg.payload = "click") : (msg.payload = "clock");
|
||||
msg.payload = (click) ? "click" : "clock";
|
||||
node.send(msg);
|
||||
}
|
||||
}
|
||||
else { console.log(key); }
|
||||
});
|
||||
|
||||
} catch(err) { node.warn("can't open MakeyMakey: Do you need root access ?"); }
|
||||
}
|
||||
else {
|
||||
|
@ -34,4 +34,4 @@ Known Issues
|
||||
|
||||
1) Every now and then something causes the MakeyMakey HID to become detached (lose focus) from this app and re-attach to another (the in focus) app... whereupon the emulated keys will end up in the wrong window... - Any ideas on how to stop this would be greatly appreciated - but I suspect it's a fundamental issue with the MakeyMakey pretending to be a HID.
|
||||
|
||||
2) Default usage is such that you have to run as root. On Debian based systems you can copy the file 82-makey.rules to the /etc/udev/rules.d folder - this should let anyone then access the MakeyMakey .
|
||||
2) Default usage is such that you have to run as root. On Debian based systems you can copy the file <i>42-makey.rules</i> to the <code>/etc/udev/rules.d/</code> folder - this should let anyone then access the MakeyMakey. To restart udev use <pre>sudo udevadm control --reload-rules</pre>
|
||||
|
Loading…
x
Reference in New Issue
Block a user