Skip to content

Commit 232a119

Browse files
committed
More tweaks to makey node - colours, jshint fixes, icons, readme etc.
1 parent 9d6d991 commit 232a119

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

hardware/makey/42-makey.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<script type="text/x-red" data-template-name="makeymakey">
1818
<div class="form-row">
19-
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
19+
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
2020
<input type="text" id="node-input-name" placeholder="Name">
2121
</div>
2222
</script>
@@ -33,7 +33,7 @@
3333
<script type="text/javascript">
3434
RED.nodes.registerType('makeymakey',{
3535
category: 'advanced-input',
36-
color:"#6da082",
36+
color:"#f6e686",
3737
defaults: {
3838
name: {value:""},
3939
vid: {value:"0x1b4f",required:true},

hardware/makey/42-makey.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function MakeyNode(n) {
2222
this.vid = 0x1b4f; // MakeyMakey vendor ID
2323
this.pid = 0x2b75; // MakeyMakey product ID
2424
var node = this;
25-
//node.log("Want:"+node.vid.toString(16)+":"+node.pid.toString(16));
2625
var path = null;
2726
var tout;
2827
var click = false;
@@ -65,13 +64,12 @@ function MakeyNode(n) {
6564
else if (key.modKeys[0] === "ctrl") {
6665
if (key.charCodes.length === 0) {
6766
click = !click;
68-
(click) ? (msg.payload = "click") : (msg.payload = "clock");
67+
msg.payload = (click) ? "click" : "clock";
6968
node.send(msg);
7069
}
7170
}
7271
else { console.log(key); }
7372
});
74-
7573
} catch(err) { node.warn("can't open MakeyMakey: Do you need root access ?"); }
7674
}
7775
else {
File renamed without changes.

hardware/makey/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Known Issues
3434

3535
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.
3636

37-
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 .
37+
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>

0 commit comments

Comments
 (0)