git @ Cat's Eye Technologies Super-Wumpus-Land / rel_1_1_2013_0410
Update included yoob.js to version 0.4. catseye 8 years ago
4 changed file(s) with 9 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
00 /*
1 * This file is part of yoob.js version 0.4-PRE
1 * This file is part of yoob.js version 0.4
22 * Available from https://github.com/catseye/yoob.js/
33 * This file is in the public domain. See http://unlicense.org/ for details.
44 */
2222 this.text = "";
2323
2424 var me = this;
25 listenObject.addEventListener('keyup', function(e) {
26 //alert('keyup:' + e.keyCode);
27 switch (e.keyCode) {
25 listenObject.addEventListener('keydown', function(e) {
26 var keyCode = e.keyCode ? e.keyCode : e.which;
27 //alert('keydown:' + keyCode);
28 switch (keyCode) {
2829 case 8: /* Backspace */
2930 if (me.text.length > 0) {
3031 if (me.terminal !== undefined) {
6162 }
6263 }, true);
6364
64 /* TODO support on more browsers, with keyup */
65 /* TODO support on more browsers, with keydown */
6566 listenObject.addEventListener('keypress', function(e) {
6667 if (e.charCode === 0 || e.charCode === 13 || e.charCode === 8) {
6768 return;
00 /*
1 * This file is part of yoob.js version 0.4-PRE
1 * This file is part of yoob.js version 0.4
22 * Available from https://github.com/catseye/yoob.js/
33 * This file is in the public domain. See http://unlicense.org/ for details.
44 */
00 /*
1 * This file is part of yoob.js version 0.4-PRE
1 * This file is part of yoob.js version 0.4
22 * Available from https://github.com/catseye/yoob.js/
33 * This file is in the public domain. See http://unlicense.org/ for details.
44 */
00 /*
1 * This file is part of yoob.js version 0.4-PRE
1 * This file is part of yoob.js version 0.4
22 * Available from https://github.com/catseye/yoob.js/
33 * This file is in the public domain. See http://unlicense.org/ for details.
44 */