function KeyboardShortcut() {
	this.keyHandlerMapper = {};

	game.input.keyboard.addCallbacks(this, this.keyDown, this.keyUp, null);
};

KeyboardShortcut.prototype.addCallback = function(keyCode, keyDownHandler, keyUpHandler, callerClassName) {
	if(this.keyHandlerMapper[keyCode] != undefined) {
		this.keyHandlerMapper[keyCode] = null;
	}

	this.keyHandlerMapper[keyCode] = {
		"keyDownHandler": keyDownHandler,
		"keyUpHandler": keyUpHandler,
		"callerClassName": callerClassName
	}

	// console.log(this.keyHandlerMapper);
}

KeyboardShortcut.prototype.keyDown = function(char) {
	// var keyCode = char.code;
	var keyCode = char.keyCode;
	// console.log(keyCode + " is pressed");

	if(this.keyHandlerMapper[keyCode] == undefined)
		return;

	var keyMapper = this.keyHandlerMapper[keyCode];
	var keyDownHandler = keyMapper["keyDownHandler"];
	if(keyDownHandler == undefined)
		return;

	if(isDebugMode())
		console.log(keyCode + " key is down (" + keyMapper["callerClassName"] + ")");
	keyDownHandler();
}

KeyboardShortcut.prototype.keyUp = function(char) {
	// var keyCode = char.code;
	var keyCode = char.keyCode;
	// console.log(keyCode + " is up");

	if(this.keyHandlerMapper[keyCode] == undefined)
		return;

	var keyMapper = this.keyHandlerMapper[keyCode];
	var keyUpHandler = keyMapper["keyUpHandler"];
	if(keyUpHandler == undefined)
		return;

	if(isDebugMode())
		console.log(keyCode + " key is up (" + keyMapper["callerClassName"] + ")");
	keyUpHandler();
}
