name: "App",
kind: "XV.App",
keyCapturePatterns: [
- {method: "captureMagstripe", start: [16, 53, 16, 66], end: [191, 13], falsePositives: 1},
- {method: "captureBarcodeScanner", start: [192], end: [13]}
+ {method: "captureMagstripe", start: [16, 53, 16, 66], end: [191, 13], falsePositives: 1}
],
components: [
{ name: "postbooks", kind: "XV.Postbooks", onTransitionStart: "handlePullout" },
{ name: "pullout", kind: "XV.Pullout", onAnimateFinish: "pulloutAnimateFinish" },
{ name: "signals", kind: enyo.Signals, onkeydown: "handleKeyDown" }
],
- captureBarcodeScanner: function (value) {
- this.$.postbooks.getActive().waterfall("onBarcodeCapture", {data: value});
- },
captureMagstripe: function (value) {
var parseMagstripe = function (input) {
var parseObj = {};
var that = this,
keyCode = inEvent.keyCode;
+ // XXX start hacks
+ if (keyCode === 189) {
+ // Dashes aren't coming through as dashes from my keyboard
+ keyCode = '-'.charCodeAt(0);
+ } else if (keyCode === 56 && inEvent.shiftKey) {
+ // there's gotta be a way to know that shift-8 is *
+ keyCode = '*'.charCodeAt(0);
+ }
+ // XXX end hacks
+
// remember the last 10 key presses
this._keyBufferArray.push(keyCode);
this._keyBufferArray = this._keyBufferArray.slice(-10);
return;
}
- if (keyCode === 189) {
- // XXX FIXME hack. Dashes aren't coming through as dashes from my keyboard
- keyCode = '-'.charCodeAt(0);
- }
if (inEvent.altKey) {
inEvent.cancelBubble = true;
inEvent.returnValue = false;
details = XT.session.details;
loginInfo.setContent(details.username + " ยท " + details.organization);
this.state = RUNNING;
+ XM.Tuplespace.trigger("activate");
XT.app.$.postbooks.activate();
}
},